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
Jérome Perrin
neoppod
Commits
97e57031
Commit
97e57031
authored
Jan 19, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: make tpc_vote computes its return value only if successful
parent
5ae69542
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
neo/client/app.py
neo/client/app.py
+5
-6
No files found.
neo/client/app.py
View file @
97e57031
...
@@ -533,15 +533,11 @@ class Application(ThreadedApplication):
...
@@ -533,15 +533,11 @@ class Application(ThreadedApplication):
_waitAnyTransactionMessage
(
txn_context
)
_waitAnyTransactionMessage
(
txn_context
)
if
txn_context
[
'data_dict'
]:
if
txn_context
[
'data_dict'
]:
raise
NEOStorageError
(
'could not store/check all oids'
)
raise
NEOStorageError
(
'could not store/check all oids'
)
if
OLD_ZODB
:
return
[(
oid
,
ResolvedSerial
)
for
oid
in
txn_context
[
'resolved_dict'
]]
return
txn_context
[
'resolved_dict'
]
def
tpc_vote
(
self
,
transaction
):
def
tpc_vote
(
self
,
transaction
):
"""Store current transaction."""
"""Store current transaction."""
txn_context
=
self
.
_txn_container
.
get
(
transaction
)
txn_context
=
self
.
_txn_container
.
get
(
transaction
)
result
=
self
.
waitStoreResponses
(
txn_context
)
self
.
waitStoreResponses
(
txn_context
)
ttid
=
txn_context
[
'ttid'
]
ttid
=
txn_context
[
'ttid'
]
packet
=
Packets
.
AskStoreTransaction
(
ttid
,
str
(
transaction
.
user
),
packet
=
Packets
.
AskStoreTransaction
(
ttid
,
str
(
transaction
.
user
),
str
(
transaction
.
description
),
dumps
(
transaction
.
_extension
),
str
(
transaction
.
description
),
dumps
(
transaction
.
_extension
),
...
@@ -583,7 +579,10 @@ class Application(ThreadedApplication):
...
@@ -583,7 +579,10 @@ class Application(ThreadedApplication):
# - If possible, recover from master failure.
# - If possible, recover from master failure.
if
'error'
in
txn_context
:
if
'error'
in
txn_context
:
raise
NEOStorageError
(
txn_context
[
'error'
])
raise
NEOStorageError
(
txn_context
[
'error'
])
return
result
if
OLD_ZODB
:
return
[(
oid
,
ResolvedSerial
)
for
oid
in
txn_context
[
'resolved_dict'
]]
return
txn_context
[
'resolved_dict'
]
def
tpc_abort
(
self
,
transaction
):
def
tpc_abort
(
self
,
transaction
):
"""Abort current transaction."""
"""Abort current transaction."""
...
...
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