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
Xavier Thompson
neoppod
Commits
3e6adac3
Commit
3e6adac3
authored
Dec 22, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change order of oid/serial fields in CheckCurrentSerial packet
parent
74c69d54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
neo/client/app.py
neo/client/app.py
+1
-1
neo/lib/protocol.py
neo/lib/protocol.py
+1
-1
neo/storage/handlers/client.py
neo/storage/handlers/client.py
+5
-5
neo/storage/transactions.py
neo/storage/transactions.py
+1
-1
No files found.
neo/client/app.py
View file @
3e6adac3
...
...
@@ -874,7 +874,7 @@ class Application(ThreadedApplication):
# after stores, and skips oids that have been successfully stored.
assert
oid
not
in
txn_context
.
cache_dict
,
oid
assert
oid
not
in
txn_context
.
data_dict
,
oid
packet
=
Packets
.
AskCheckCurrentSerial
(
ttid
,
serial
,
oid
)
packet
=
Packets
.
AskCheckCurrentSerial
(
ttid
,
oid
,
serial
)
txn_context
.
data_dict
[
oid
]
=
CHECKED_SERIAL
,
txn_context
.
write
(
self
,
packet
,
oid
,
0
,
oid
=
oid
,
serial
=
serial
)
self
.
_waitAnyTransactionMessage
(
txn_context
,
False
)
...
...
neo/lib/protocol.py
View file @
3e6adac3
...
...
@@ -1259,8 +1259,8 @@ class CheckCurrentSerial(Packet):
"""
_fmt
=
PStruct
(
'ask_check_current_serial'
,
PTID
(
'tid'
),
PTID
(
'serial'
),
POID
(
'oid'
),
PTID
(
'serial'
),
)
_answer
=
StoreObject
.
_answer
...
...
neo/storage/handlers/client.py
View file @
3e6adac3
...
...
@@ -162,20 +162,20 @@ class ClientOperationHandler(EventHandler):
p
=
Packets
.
AnswerObjectHistory
(
oid
,
history_list
)
conn
.
answer
(
p
)
def
askCheckCurrentSerial
(
self
,
conn
,
ttid
,
serial
,
oid
):
def
askCheckCurrentSerial
(
self
,
conn
,
ttid
,
oid
,
serial
):
self
.
app
.
tm
.
register
(
conn
,
ttid
)
self
.
_askCheckCurrentSerial
(
conn
,
ttid
,
serial
,
oid
,
time
.
time
())
self
.
_askCheckCurrentSerial
(
conn
,
ttid
,
oid
,
serial
,
time
.
time
())
def
_askCheckCurrentSerial
(
self
,
conn
,
ttid
,
serial
,
oid
,
request_time
):
def
_askCheckCurrentSerial
(
self
,
conn
,
ttid
,
oid
,
serial
,
request_time
):
try
:
self
.
app
.
tm
.
checkCurrentSerial
(
ttid
,
serial
,
oid
)
self
.
app
.
tm
.
checkCurrentSerial
(
ttid
,
oid
,
serial
)
except
ConflictError
,
err
:
# resolvable or not
conn
.
answer
(
Packets
.
AnswerCheckCurrentSerial
(
err
.
tid
))
except
DelayedError
:
# locked by a previous transaction, retry later
self
.
app
.
tm
.
queueEvent
(
self
.
_askCheckCurrentSerial
,
conn
,
(
ttid
,
serial
,
oid
,
request_time
))
(
ttid
,
oid
,
serial
,
request_time
))
except
NotRegisteredError
:
# transaction was aborted, cancel this event
logging
.
info
(
'Forget serial check of %s:%s by %s delayed by %s'
,
...
...
neo/storage/transactions.py
View file @
3e6adac3
...
...
@@ -291,7 +291,7 @@ class TransactionManager(EventQueue):
logging
.
debug
(
'Transaction %s storing %s'
,
dump
(
ttid
),
dump
(
oid
))
self
.
_store_lock_dict
[
oid
]
=
ttid
def
checkCurrentSerial
(
self
,
ttid
,
serial
,
oid
):
def
checkCurrentSerial
(
self
,
ttid
,
oid
,
serial
):
try
:
transaction
=
self
.
_transaction_dict
[
ttid
]
except
KeyError
:
...
...
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