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
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
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
Hide 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):
try
:
cell_list
=
self
.
app
.
pt
.
setUpToDate
(
node
,
offset
)
if
not
cell_list
:
raise
ProtocolError
(
'Non-oudated partition'
)
raise
ProtocolError
(
'Non-ou
t
dated partition'
)
except
PartitionTableException
,
e
:
raise
ProtocolError
(
str
(
e
))
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):
def
expectOudatedCells
(
self
,
number
,
*
args
,
**
kw
):
def
callback
(
last_try
):
row_list
=
self
.
neoctl
.
getPartitionRowList
()[
1
]
number_of_oudated
=
0
number_of_ou
t
dated
=
0
for
row
in
row_list
:
for
cell
in
row
[
1
]:
if
cell
[
1
]
==
CellStates
.
OUT_OF_DATE
:
number_of_oudated
+=
1
return
number_of_ou
dated
==
number
,
number_of_ou
dated
number_of_ou
t
dated
+=
1
return
number_of_ou
tdated
==
number
,
number_of_out
dated
self
.
expectCondition
(
callback
,
*
args
,
**
kw
)
def
expectAssignedCells
(
self
,
process
,
number
,
*
args
,
**
kw
):
...
...
neo/tests/functional/testStorage.py
View file @
b62b8dc3
...
...
@@ -157,7 +157,7 @@ class StorageTests(NEOFunctionalTest):
self
.
neo
.
expectClusterRunning
()
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 """
# populate the two storages
...
...
@@ -444,7 +444,7 @@ class StorageTests(NEOFunctionalTest):
st
.
tpc_begin
(
t
)
st
.
store
(
oid
,
rev
,
data
,
''
,
t
)
# start the oudated storage
# start the ou
t
dated storage
stopped
[
0
].
start
()
self
.
neo
.
expectPending
(
stopped
[
0
])
self
.
neo
.
neoctl
.
enableStorageList
([
stopped
[
0
].
getUUID
()])
...
...
tools/replication
View file @
b62b8dc3
...
...
@@ -94,18 +94,18 @@ class ReplicationBenchmark(BenchmarkRunner):
return
self
.
buildReport
(
p_time
,
r_time
),
content
def
replicate
(
self
,
neo
):
def
number_of_oudated_cell
():
def
number_of_ou
t
dated_cell
():
row_list
=
neo
.
neoctl
.
getPartitionRowList
()[
1
]
number_of_oudated
=
0
number_of_ou
t
dated
=
0
for
row
in
row_list
:
for
cell
in
row
[
1
]:
if
cell
[
1
]
==
CellStates
.
OUT_OF_DATE
:
number_of_oudated
+=
1
return
number_of_oudated
number_of_ou
t
dated
+=
1
return
number_of_ou
t
dated
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
)
if
number_of_oudated_cell
()
>
0
:
if
number_of_ou
t
dated_cell
()
>
0
:
raise
Exception
(
'Replication takes too long'
)
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