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
Vincent Pelletier
neoppod
Commits
8ef1ddba
Commit
8ef1ddba
authored
Nov 09, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! client: discard late answers to lockless writes
Since commit
50e7fe52
, some code can be simplified.
parent
a2e278d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
neo/client/transactions.py
neo/client/transactions.py
+5
-12
No files found.
neo/client/transactions.py
View file @
8ef1ddba
...
@@ -105,22 +105,15 @@ class Transaction(object):
...
@@ -105,22 +105,15 @@ class Transaction(object):
# conflict. Because we have no way to identify such case, we must keep
# conflict. Because we have no way to identify such case, we must keep
# the data in self.data_dict until all nodes have answered so we remain
# the data in self.data_dict until all nodes have answered so we remain
# able to resolve conflicts.
# able to resolve conflicts.
data
,
serial
,
uuid_list
=
self
.
data_dict
[
oid
]
try
:
try
:
data
,
serial
,
uuid_list
=
self
.
data_dict
[
oid
]
uuid_list
.
remove
(
uuid
)
uuid_list
.
remove
(
uuid
)
except
KeyError
:
# 1. store to S1 and S2
# 2. S2 reports a conflict
# 3. store to S1 and S2 # conflict resolution
# 4. S1 does not report a conflict (lockless)
# 5. S2 answers before S1 for the second store
return
except
ValueError
:
except
ValueError
:
# The most common case for this exception is because nodeLost()
# The most common case for this exception is because nodeLost()
# tries all oids blindly.
Other possible cases:
# tries all oids blindly.
#
- like above (KeyError), but with S2 answering last
#
Another possible case is when we receive several positive answers
#
- answer to resolved conflict before the first answer from a
#
from a node that is being disconnected by the master, whereas the
#
node that was being disconnected by the master
#
first one (at least) should actually be conflict answer.
return
return
if
lockless
:
if
lockless
:
if
lockless
!=
serial
:
# late lockless write
if
lockless
!=
serial
:
# late lockless write
...
...
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