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
5e0639c1
Commit
5e0639c1
authored
Oct 24, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e4059423
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
neo/storage/handlers/client.py
neo/storage/handlers/client.py
+7
-6
neo/storage/handlers/identification.py
neo/storage/handlers/identification.py
+1
-1
t/zodbdump.py
t/zodbdump.py
+2
-2
No files found.
neo/storage/handlers/client.py
View file @
5e0639c1
...
...
@@ -65,15 +65,15 @@ class ClientOperationHandler(EventHandler):
assert
node
is
not
None
,
conn
self
.
app
.
nm
.
remove
(
node
)
def
abortTransaction
(
self
,
conn
,
ttid
):
def
abortTransaction
(
self
,
conn
,
ttid
):
# NOTE rw
self
.
app
.
tm
.
abort
(
ttid
)
def
askStoreTransaction
(
self
,
conn
,
ttid
,
*
txn_info
):
def
askStoreTransaction
(
self
,
conn
,
ttid
,
*
txn_info
):
# NOTE rw
self
.
app
.
tm
.
register
(
conn
,
ttid
)
self
.
app
.
tm
.
vote
(
ttid
,
txn_info
)
conn
.
answer
(
Packets
.
AnswerStoreTransaction
())
def
askVoteTransaction
(
self
,
conn
,
ttid
):
def
askVoteTransaction
(
self
,
conn
,
ttid
):
# NOTE rw
self
.
app
.
tm
.
vote
(
ttid
)
conn
.
answer
(
Packets
.
AnswerVoteTransaction
())
...
...
@@ -111,7 +111,7 @@ class ClientOperationHandler(EventHandler):
logging
.
info
(
'StoreObject delay: %.02fs'
,
duration
)
conn
.
answer
(
Packets
.
AnswerStoreObject
(
0
,
oid
,
serial
))
def
askStoreObject
(
self
,
conn
,
oid
,
serial
,
def
askStoreObject
(
self
,
conn
,
oid
,
serial
,
# NOTE rw
compression
,
checksum
,
data
,
data_serial
,
ttid
,
unlock
):
if
1
<
compression
:
raise
ProtocolError
(
'invalid compression value'
)
...
...
@@ -126,7 +126,6 @@ class ClientOperationHandler(EventHandler):
self
.
_askStoreObject
(
conn
,
oid
,
serial
,
compression
,
checksum
,
data
,
data_serial
,
ttid
,
unlock
,
time
.
time
())
# NOTE
def
askTIDsFrom
(
self
,
conn
,
min_tid
,
max_tid
,
length
,
partition
):
conn
.
answer
(
Packets
.
AnswerTIDsFrom
(
self
.
app
.
dm
.
getReplicationTIDList
(
min_tid
,
max_tid
,
length
,
partition
)))
...
...
@@ -146,9 +145,10 @@ class ClientOperationHandler(EventHandler):
tid_list
=
app
.
dm
.
getTIDList
(
first
,
last
-
first
,
partition_list
)
conn
.
answer
(
Packets
.
AnswerTIDs
(
tid_list
))
def
askFinalTID
(
self
,
conn
,
ttid
):
def
askFinalTID
(
self
,
conn
,
ttid
):
# NOTE rw
conn
.
answer
(
Packets
.
AnswerFinalTID
(
self
.
app
.
tm
.
getFinalTID
(
ttid
)))
# XXX not sure about rw (TODO recheck)
def
askObjectUndoSerial
(
self
,
conn
,
ttid
,
ltid
,
undone_tid
,
oid_list
):
app
=
self
.
app
findUndoTID
=
app
.
dm
.
findUndoTID
...
...
@@ -191,6 +191,7 @@ class ClientOperationHandler(EventHandler):
p
=
Packets
.
AnswerObjectHistory
(
oid
,
history_list
)
conn
.
answer
(
p
)
# XXX should not be rw, but recheck
def
askCheckCurrentSerial
(
self
,
conn
,
ttid
,
serial
,
oid
):
self
.
app
.
tm
.
register
(
conn
,
ttid
)
self
.
_askCheckCurrentSerial
(
conn
,
ttid
,
serial
,
oid
,
time
.
time
())
...
...
neo/storage/handlers/identification.py
View file @
5e0639c1
...
...
@@ -48,7 +48,7 @@ class IdentificationHandler(EventHandler):
raise
BrokenNodeDisallowedError
# choose the handler according to the node type
if
node_type
==
NodeTypes
.
CLIENT
:
handler
=
ClientOperationHandler
handler
=
ClientOperationHandler
# NOTE
if
node
is
None
:
node
=
app
.
nm
.
createClient
(
uuid
=
uuid
)
elif
node
.
isConnected
():
...
...
t/zodbdump.py
View file @
5e0639c1
...
...
@@ -102,8 +102,8 @@ def mkneostor():
}
stor
=
NEOStorage
(
**
kw
)
from
time
import
sleep
sleep
(
2
)
#
from time import sleep
#
sleep(2)
return
stor
...
...
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