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
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
Jérome Perrin
neoppod
Commits
87eee431
Commit
87eee431
authored
Dec 22, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix replication of unfinished imported transactions
parent
4d3f3723
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
neo/master/handlers/storage.py
neo/master/handlers/storage.py
+4
-1
neo/storage/handlers/storage.py
neo/storage/handlers/storage.py
+4
-0
neo/storage/replicator.py
neo/storage/replicator.py
+1
-0
No files found.
neo/master/handlers/storage.py
View file @
87eee431
...
...
@@ -53,7 +53,10 @@ class StorageServiceHandler(BaseServiceHandler):
last_tid
=
app
.
pt
.
getBackupTid
(
min
)
pending_list
=
()
else
:
last_tid
=
app
.
tm
.
getLastTID
()
# This can't be app.tm.getLastTID() for imported transactions,
# because outdated cells must at least wait that they're locked.
# For normal transactions, it would not matter.
last_tid
=
app
.
getLastTransaction
()
pending_list
=
app
.
tm
.
registerForNotification
(
conn
.
getUUID
())
p
=
Packets
.
AnswerUnfinishedTransactions
(
last_tid
,
pending_list
)
conn
.
answer
(
p
)
...
...
neo/storage/handlers/storage.py
View file @
87eee431
...
...
@@ -183,6 +183,10 @@ class StorageOperationHandler(EventHandler):
if
app
.
tm
.
isLockedTid
(
max_tid
):
# Wow, backup cluster is fast. Requested transactions are still in
# ttrans/ttobj so wait a little.
# This can also happen for internal replication, when
# NotifyTransactionFinished(M->S) + AskFetchTransactions(S->S)
# is faster than
# NotifyUnlockInformation(M->S)
app
.
queueEvent
(
self
.
askFetchTransactions
,
conn
,
(
partition
,
length
,
min_tid
,
max_tid
,
tid_list
))
return
...
...
neo/storage/replicator.py
View file @
87eee431
...
...
@@ -92,6 +92,7 @@ class Replicator(object):
def
setUnfinishedTIDList
(
self
,
max_tid
,
ttid_list
,
offset_list
):
"""This is a callback from MasterOperationHandler."""
assert
self
.
ttid_set
.
issubset
(
ttid_list
),
(
self
.
ttid_set
,
ttid_list
)
if
ttid_list
:
self
.
ttid_set
.
update
(
ttid_list
)
max_ttid
=
max
(
ttid_list
)
...
...
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