Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
38583af9
Commit
38583af9
authored
Jul 27, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: better exception handling in tpc_abort
parent
77132157
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
neo/client/app.py
neo/client/app.py
+12
-18
No files found.
neo/client/app.py
View file @
38583af9
...
@@ -654,24 +654,18 @@ class Application(ThreadedApplication):
...
@@ -654,24 +654,18 @@ class Application(ThreadedApplication):
txn_context
=
self
.
_txn_container
.
pop
(
transaction
)
txn_context
=
self
.
_txn_container
.
pop
(
transaction
)
if
txn_context
is
None
:
if
txn_context
is
None
:
return
return
ttid
=
txn_context
[
'ttid'
]
p
=
Packets
.
AbortTransaction
(
txn_context
[
'ttid'
])
p
=
Packets
.
AbortTransaction
(
ttid
)
# cancel transaction on all those nodes
getConnForNode
=
self
.
cp
.
getConnForNode
nodes
=
map
(
self
.
cp
.
getConnForNode
,
# cancel transaction one all those nodes
txn_context
[
'involved_nodes'
]
|
nodes
=
txn_context
[
'involved_nodes'
]
txn_context
[
'checked_nodes'
])
nodes
|=
txn_context
[
'checked_nodes'
]
nodes
.
append
(
self
.
master_conn
)
for
node
in
nodes
:
for
conn
in
nodes
:
conn
=
getConnForNode
(
node
)
if
conn
is
not
None
:
if
conn
is
None
:
try
:
continue
conn
.
notify
(
p
)
try
:
except
ConnectionClosed
:
conn
.
notify
(
p
)
pass
except
:
logging
.
exception
(
'Exception in tpc_abort while notifying'
'storage node %r of abortion, ignoring.'
,
conn
)
conn
=
self
.
master_conn
if
conn
is
not
None
:
conn
.
notify
(
p
)
# We don't need to flush queue, as it won't be reused by future
# We don't need to flush queue, as it won't be reused by future
# transactions (deleted on next line & indexed by transaction object
# transactions (deleted on next line & indexed by transaction object
# instance).
# instance).
...
...
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