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
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
Stefane Fermigier
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):
txn_context
=
self
.
_txn_container
.
pop
(
transaction
)
if
txn_context
is
None
:
return
ttid
=
txn_context
[
'ttid'
]
p
=
Packets
.
AbortTransaction
(
ttid
)
getConnForNode
=
self
.
cp
.
getConnForNode
# cancel transaction one all those nodes
nodes
=
txn_context
[
'involved_nodes'
]
nodes
|=
txn_context
[
'checked_nodes'
]
for
node
in
nodes
:
conn
=
getConnForNode
(
node
)
if
conn
is
None
:
continue
try
:
conn
.
notify
(
p
)
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
)
p
=
Packets
.
AbortTransaction
(
txn_context
[
'ttid'
])
# cancel transaction on all those nodes
nodes
=
map
(
self
.
cp
.
getConnForNode
,
txn_context
[
'involved_nodes'
]
|
txn_context
[
'checked_nodes'
])
nodes
.
append
(
self
.
master_conn
)
for
conn
in
nodes
:
if
conn
is
not
None
:
try
:
conn
.
notify
(
p
)
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).
...
...
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