Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
07efb0ca
Commit
07efb0ca
authored
Aug 21, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In backup mode, fix update of outdated partition when there's more than 1 replica
parent
32e5274a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
neo/master/backup_app.py
neo/master/backup_app.py
+1
-1
neo/master/handlers/storage.py
neo/master/handlers/storage.py
+1
-1
neo/master/pt.py
neo/master/pt.py
+2
-2
No files found.
neo/master/backup_app.py
View file @
07efb0ca
...
@@ -145,7 +145,7 @@ class BackupApplication(object):
...
@@ -145,7 +145,7 @@ class BackupApplication(object):
# they would be quickly updated at the beginning of the
# they would be quickly updated at the beginning of the
# RUNNING phase. This may simplify code.
# RUNNING phase. This may simplify code.
# Any unfinished replication from upstream will be truncated.
# Any unfinished replication from upstream will be truncated.
while
pt
.
get
CheckTid
(
xrange
(
pt
.
getPartitions
())
)
<
tid
:
while
pt
.
get
BackupTid
(
min
)
<
tid
:
poll
(
1
)
poll
(
1
)
last_tid
=
app
.
getLastTransaction
()
last_tid
=
app
.
getLastTransaction
()
handler
=
EventHandler
(
app
)
handler
=
EventHandler
(
app
)
...
...
neo/master/handlers/storage.py
View file @
07efb0ca
...
@@ -50,7 +50,7 @@ class StorageServiceHandler(BaseServiceHandler):
...
@@ -50,7 +50,7 @@ class StorageServiceHandler(BaseServiceHandler):
def
askUnfinishedTransactions
(
self
,
conn
):
def
askUnfinishedTransactions
(
self
,
conn
):
app
=
self
.
app
app
=
self
.
app
if
app
.
backup_tid
:
if
app
.
backup_tid
:
last_tid
=
app
.
pt
.
getBackupTid
()
last_tid
=
app
.
pt
.
getBackupTid
(
min
)
pending_list
=
()
pending_list
=
()
else
:
else
:
last_tid
=
app
.
tm
.
getLastTID
()
last_tid
=
app
.
tm
.
getLastTID
()
...
...
neo/master/pt.py
View file @
07efb0ca
...
@@ -325,9 +325,9 @@ class PartitionTable(neo.lib.pt.PartitionTable):
...
@@ -325,9 +325,9 @@ class PartitionTable(neo.lib.pt.PartitionTable):
cell
.
backup_tid
=
backup_tid_dict
.
get
(
cell
.
getUUID
(),
cell
.
backup_tid
=
backup_tid_dict
.
get
(
cell
.
getUUID
(),
ZERO_TID
)
ZERO_TID
)
def
getBackupTid
(
self
):
def
getBackupTid
(
self
,
mean
=
max
):
try
:
try
:
return
min
(
m
ax
(
cell
.
backup_tid
for
cell
in
row
if
cell
.
isReadable
())
return
min
(
m
ean
(
x
.
backup_tid
for
x
in
row
if
x
.
isReadable
())
for
row
in
self
.
partition_list
)
for
row
in
self
.
partition_list
)
except
ValueError
:
except
ValueError
:
return
ZERO_TID
return
ZERO_TID
...
...
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