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
Levin Zimmermann
neoppod
Commits
f25b8ee3
Commit
f25b8ee3
authored
Nov 07, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: clarify several assertions
parent
4150ffb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
neo/storage/transactions.py
neo/storage/transactions.py
+15
-17
No files found.
neo/storage/transactions.py
View file @
f25b8ee3
...
@@ -580,24 +580,22 @@ class TransactionManager(EventQueue):
...
@@ -580,24 +580,22 @@ class TransactionManager(EventQueue):
# Lockless store (we are replicating this partition),
# Lockless store (we are replicating this partition),
# or unresolved deadlock.
# or unresolved deadlock.
continue
continue
if
ttid
!=
write_locking_tid
:
if
ttid
==
write_locking_tid
:
if
__debug__
:
del
self
.
_store_lock_dict
[
oid
]
other
=
self
.
_transaction_dict
[
write_locking_tid
]
elif
__debug__
:
x
=
(
oid
,
ttid
,
write_locking_tid
,
other
=
self
.
_transaction_dict
[
write_locking_tid
]
self
.
_replicated
,
transaction
.
lockless
)
x
=
(
oid
,
ttid
,
write_locking_tid
,
lockless
=
oid
in
transaction
.
lockless
self
.
_replicated
,
transaction
.
lockless
)
# If there were multiple lockless writes, lockless can be
assert
oid
in
other
.
serial_dict
,
x
# False (after a rebase) whereas the partition is still not
if
oid
in
transaction
.
lockless
:
# notified as replicated.
# Several lockless stores for this oid and among them,
assert
oid
in
other
.
serial_dict
and
not
(
lockless
and
# a higher ttid is still pending.
not
self
.
_replicated
.
get
(
self
.
getPartition
(
oid
))),
x
assert
transaction
<
other
,
x
if
not
lockless
:
# There may remain a single lockless store so we'll need
# this partition to be checked in _notifyReplicated.
assert
self
.
_replicated
.
get
(
self
.
getPartition
(
oid
)),
x
else
:
# unresolved deadlock
assert
not
locked
,
x
assert
not
locked
,
x
continue
# unresolved deadlock
# Several lockless stores for this oid and among them,
# a higher ttid is still pending.
assert
transaction
<
other
,
x
del
self
.
_store_lock_dict
[
oid
]
# remove the transaction
# remove the transaction
del
self
.
_transaction_dict
[
ttid
]
del
self
.
_transaction_dict
[
ttid
]
if
self
.
_replicated
:
if
self
.
_replicated
:
...
...
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