Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefane Fermigier
neo
Commits
b62b8dc3
Commit
b62b8dc3
authored
Nov 27, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spelling: oudated -> outdated
parent
6e32ebb7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
neo/master/handlers/storage.py
neo/master/handlers/storage.py
+1
-1
neo/tests/functional/__init__.py
neo/tests/functional/__init__.py
+3
-3
neo/tests/functional/testStorage.py
neo/tests/functional/testStorage.py
+2
-2
tools/replication
tools/replication
+6
-6
No files found.
neo/master/handlers/storage.py
View file @
b62b8dc3
...
@@ -85,7 +85,7 @@ class StorageServiceHandler(BaseServiceHandler):
...
@@ -85,7 +85,7 @@ class StorageServiceHandler(BaseServiceHandler):
try
:
try
:
cell_list
=
self
.
app
.
pt
.
setUpToDate
(
node
,
offset
)
cell_list
=
self
.
app
.
pt
.
setUpToDate
(
node
,
offset
)
if
not
cell_list
:
if
not
cell_list
:
raise
ProtocolError
(
'Non-oudated partition'
)
raise
ProtocolError
(
'Non-ou
t
dated partition'
)
except
PartitionTableException
,
e
:
except
PartitionTableException
,
e
:
raise
ProtocolError
(
str
(
e
))
raise
ProtocolError
(
str
(
e
))
logging
.
debug
(
"%s is up for offset %s"
,
node
,
offset
)
logging
.
debug
(
"%s is up for offset %s"
,
node
,
offset
)
...
...
neo/tests/functional/__init__.py
View file @
b62b8dc3
...
@@ -573,12 +573,12 @@ class NEOCluster(object):
...
@@ -573,12 +573,12 @@ class NEOCluster(object):
def
expectOudatedCells
(
self
,
number
,
*
args
,
**
kw
):
def
expectOudatedCells
(
self
,
number
,
*
args
,
**
kw
):
def
callback
(
last_try
):
def
callback
(
last_try
):
row_list
=
self
.
neoctl
.
getPartitionRowList
()[
1
]
row_list
=
self
.
neoctl
.
getPartitionRowList
()[
1
]
number_of_oudated
=
0
number_of_ou
t
dated
=
0
for
row
in
row_list
:
for
row
in
row_list
:
for
cell
in
row
[
1
]:
for
cell
in
row
[
1
]:
if
cell
[
1
]
==
CellStates
.
OUT_OF_DATE
:
if
cell
[
1
]
==
CellStates
.
OUT_OF_DATE
:
number_of_oudated
+=
1
number_of_ou
t
dated
+=
1
return
number_of_ou
dated
==
number
,
number_of_ou
dated
return
number_of_ou
tdated
==
number
,
number_of_out
dated
self
.
expectCondition
(
callback
,
*
args
,
**
kw
)
self
.
expectCondition
(
callback
,
*
args
,
**
kw
)
def
expectAssignedCells
(
self
,
process
,
number
,
*
args
,
**
kw
):
def
expectAssignedCells
(
self
,
process
,
number
,
*
args
,
**
kw
):
...
...
neo/tests/functional/testStorage.py
View file @
b62b8dc3
...
@@ -157,7 +157,7 @@ class StorageTests(NEOFunctionalTest):
...
@@ -157,7 +157,7 @@ class StorageTests(NEOFunctionalTest):
self
.
neo
.
expectClusterRunning
()
self
.
neo
.
expectClusterRunning
()
def
testOudatedCellsOnDownStorage
(
self
):
def
testOudatedCellsOnDownStorage
(
self
):
""" Check that the storage cells are set as oudated when the node is
""" Check that the storage cells are set as ou
t
dated when the node is
down, the cluster remains up since there is a replica """
down, the cluster remains up since there is a replica """
# populate the two storages
# populate the two storages
...
@@ -444,7 +444,7 @@ class StorageTests(NEOFunctionalTest):
...
@@ -444,7 +444,7 @@ class StorageTests(NEOFunctionalTest):
st
.
tpc_begin
(
t
)
st
.
tpc_begin
(
t
)
st
.
store
(
oid
,
rev
,
data
,
''
,
t
)
st
.
store
(
oid
,
rev
,
data
,
''
,
t
)
# start the oudated storage
# start the ou
t
dated storage
stopped
[
0
].
start
()
stopped
[
0
].
start
()
self
.
neo
.
expectPending
(
stopped
[
0
])
self
.
neo
.
expectPending
(
stopped
[
0
])
self
.
neo
.
neoctl
.
enableStorageList
([
stopped
[
0
].
getUUID
()])
self
.
neo
.
neoctl
.
enableStorageList
([
stopped
[
0
].
getUUID
()])
...
...
tools/replication
View file @
b62b8dc3
...
@@ -94,18 +94,18 @@ class ReplicationBenchmark(BenchmarkRunner):
...
@@ -94,18 +94,18 @@ class ReplicationBenchmark(BenchmarkRunner):
return
self
.
buildReport
(
p_time
,
r_time
),
content
return
self
.
buildReport
(
p_time
,
r_time
),
content
def
replicate
(
self
,
neo
):
def
replicate
(
self
,
neo
):
def
number_of_oudated_cell
():
def
number_of_ou
t
dated_cell
():
row_list
=
neo
.
neoctl
.
getPartitionRowList
()[
1
]
row_list
=
neo
.
neoctl
.
getPartitionRowList
()[
1
]
number_of_oudated
=
0
number_of_ou
t
dated
=
0
for
row
in
row_list
:
for
row
in
row_list
:
for
cell
in
row
[
1
]:
for
cell
in
row
[
1
]:
if
cell
[
1
]
==
CellStates
.
OUT_OF_DATE
:
if
cell
[
1
]
==
CellStates
.
OUT_OF_DATE
:
number_of_oudated
+=
1
number_of_ou
t
dated
+=
1
return
number_of_oudated
return
number_of_ou
t
dated
end_time
=
time
.
time
()
+
3600
end_time
=
time
.
time
()
+
3600
while
time
.
time
()
<=
end_time
and
number_of_oudated_cell
()
>
0
:
while
time
.
time
()
<=
end_time
and
number_of_ou
t
dated_cell
()
>
0
:
time
.
sleep
(
1
)
time
.
sleep
(
1
)
if
number_of_oudated_cell
()
>
0
:
if
number_of_ou
t
dated_cell
()
>
0
:
raise
Exception
(
'Replication takes too long'
)
raise
Exception
(
'Replication takes too long'
)
def
buildReport
(
self
,
p_time
,
r_time
):
def
buildReport
(
self
,
p_time
,
r_time
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment