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
fa7fbad6
Commit
fa7fbad6
authored
Feb 20, 2020
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code clean-up, comment fixes
(cherry picked from commit
43029be2
)
parent
011eba12
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
15 deletions
+14
-15
neo/client/app.py
neo/client/app.py
+3
-4
neo/client/handlers/master.py
neo/client/handlers/master.py
+2
-3
neo/client/transactions.py
neo/client/transactions.py
+1
-1
neo/master/app.py
neo/master/app.py
+2
-2
neo/storage/handlers/client.py
neo/storage/handlers/client.py
+1
-1
neo/storage/transactions.py
neo/storage/transactions.py
+5
-4
No files found.
neo/client/app.py
View file @
fa7fbad6
...
...
@@ -669,7 +669,7 @@ class Application(ThreadedApplication):
txn_context
=
self
.
_txn_container
.
pop
(
transaction
)
if
txn_context
is
None
:
return
# We want th
at the involved nodes
abort a transaction after any
# We want th
e involved nodes to
abort a transaction after any
# other packet sent by the client for this transaction. IOW, if we
# already have a connection with a storage node, potentially with
# a pending write, aborting only via the master may lead to a race
...
...
@@ -698,9 +698,8 @@ class Application(ThreadedApplication):
txn_context
.
conn_dict
))
except
ConnectionClosed
:
pass
# We don't need to flush queue, as it won't be reused by future
# transactions (deleted on next line & indexed by transaction object
# instance).
# No need to flush queue, as it will be destroyed on return,
# along with txn_context.
self
.
dispatcher
.
forget_queue
(
txn_context
.
queue
,
flush_queue
=
False
)
def
tpc_finish
(
self
,
transaction
,
f
=
None
):
...
...
neo/client/handlers/master.py
View file @
fa7fbad6
...
...
@@ -68,11 +68,10 @@ class PrimaryNotificationsHandler(MTEventHandler):
def
answerTransactionFinished
(
self
,
conn
,
_
,
tid
,
callback
,
cache_dict
):
app
=
self
.
app
app
.
last_tid
=
tid
# Update cache
cache
=
app
.
_cache
with
app
.
_cache_lock
:
invalidate
=
app
.
_cache
.
invalidate
invalidate
=
cache
.
invalidate
loading_get
=
app
.
_loading
.
get
with
app
.
_cache_lock
:
for
oid
,
data
in
cache_dict
.
iteritems
():
# Update ex-latest value in cache
invalidate
(
oid
,
tid
)
...
...
neo/client/transactions.py
View file @
fa7fbad6
...
...
@@ -50,7 +50,7 @@ class Transaction(object):
self
.
conflict_dict
=
{}
# {oid: serial}
# resolved conflicts
self
.
resolved_dict
=
{}
# {oid: serial}
# involved storage nodes; connection is None i
s
connection was lost
# involved storage nodes; connection is None i
f
connection was lost
self
.
conn_dict
=
{}
# {node_id: connection}
def
__repr__
(
self
):
...
...
neo/master/app.py
View file @
fa7fbad6
...
...
@@ -587,7 +587,7 @@ class Application(BaseApplication):
node
.
send
(
Packets
.
StartOperation
(
self
.
backup_tid
))
uuid
=
node
.
getUUID
()
assert
uuid
not
in
self
.
storage_starting_set
if
uuid
not
in
self
.
storage_ready_dict
:
assert
uuid
not
in
self
.
storage_ready_dict
self
.
storage_starting_set
.
add
(
uuid
)
def
setStorageReady
(
self
,
uuid
):
...
...
neo/storage/handlers/client.py
View file @
fa7fbad6
...
...
@@ -34,7 +34,7 @@ class ClientOperationHandler(BaseHandler):
app
=
self
.
app
if
app
.
operational
:
# Even if in most cases, abortFor is called from both this method
# and BaseMasterHandler.notify
PartitionChanges
(especially since
# and BaseMasterHandler.notify
NodeInformation
(especially since
# storage nodes disconnects unknown clients on their own), these 2
# handlers also cover distinct scenarios, so neither of them is
# redundant:
...
...
neo/storage/transactions.py
View file @
fa7fbad6
...
...
@@ -139,6 +139,7 @@ class TransactionManager(EventQueue):
def
replicating
(
self
,
offset_list
):
self
.
_replicating
.
update
(
offset_list
)
if
__debug__
:
isdisjoint
=
set
(
offset_list
).
isdisjoint
assert
isdisjoint
(
self
.
_replicated
),
(
offset_list
,
self
.
_replicated
)
assert
isdisjoint
(
map
(
self
.
getPartition
,
self
.
_store_lock_dict
)),
(
...
...
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