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
Ivan Tyagov
neoppod
Commits
c9658ff3
Commit
c9658ff3
authored
Oct 19, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Importer: fix retrieval of an object from ZODB when next serial in NEO
parent
f1bc3c32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
neo/storage/database/importer.py
neo/storage/database/importer.py
+5
-2
neo/tests/threaded/testImporter.py
neo/tests/threaded/testImporter.py
+10
-1
No files found.
neo/storage/database/importer.py
View file @
c9658ff3
...
@@ -491,8 +491,11 @@ class ImporterDatabaseManager(DatabaseManager):
...
@@ -491,8 +491,11 @@ class ImporterDatabaseManager(DatabaseManager):
# except clause because it would be crazy to import a
# except clause because it would be crazy to import a
# NEO DB using this backend.
# NEO DB using this backend.
checksum
=
None
checksum
=
None
return
(
serial
,
next_serial
or
if
not
next_serial
:
db
.
_getNextTID
(
db
.
_getPartition
(
u_oid
),
u_oid
,
u_tid
),
next_serial
=
db
.
_getNextTID
(
db
.
_getPartition
(
u_oid
),
u_oid
,
u_tid
)
if
next_serial
:
next_serial
=
p64
(
next_serial
)
return
(
serial
,
next_serial
,
0
,
checksum
,
value
,
zodb
.
getDataTid
(
z_oid
,
u_tid
))
0
,
checksum
,
value
,
zodb
.
getDataTid
(
z_oid
,
u_tid
))
def
getTransaction
(
self
,
tid
,
all
=
False
):
def
getTransaction
(
self
,
tid
,
all
=
False
):
...
...
neo/tests/threaded/testImporter.py
View file @
c9658ff3
...
@@ -193,11 +193,20 @@ class ImporterTests(NEOThreadedTest):
...
@@ -193,11 +193,20 @@ class ImporterTests(NEOThreadedTest):
cluster
.
start
()
cluster
.
start
()
t
,
c
=
cluster
.
getTransaction
()
t
,
c
=
cluster
.
getTransaction
()
r
=
c
.
root
()[
"neo"
]
r
=
c
.
root
()[
"neo"
]
# Test retrieving of an object from ZODB when next serial in NEO.
r
.
_p_changed
=
1
t
.
commit
()
t
.
begin
()
storage
=
c
.
db
().
storage
storage
.
_cache
.
clear
()
storage
.
loadBefore
(
r
.
_p_oid
,
r
.
_p_serial
)
##
self
.
assertRaisesRegexp
(
NotImplementedError
,
" getObjectHistory$"
,
self
.
assertRaisesRegexp
(
NotImplementedError
,
" getObjectHistory$"
,
c
.
db
().
history
,
r
.
_p_oid
)
c
.
db
().
history
,
r
.
_p_oid
)
i
=
r
.
walk
()
i
=
r
.
walk
()
next
(
islice
(
i
,
9
,
None
))
next
(
islice
(
i
,
9
,
None
))
dm
.
doOperation
(
cluster
.
storage
)
# resume
logging
.
info
(
"start migration"
)
dm
.
doOperation
(
cluster
.
storage
)
deque
(
i
,
maxlen
=
0
)
deque
(
i
,
maxlen
=
0
)
last_import
=
None
last_import
=
None
for
i
,
r
in
enumerate
(
r
.
treeFromFs
(
src_root
,
10
)):
for
i
,
r
in
enumerate
(
r
.
treeFromFs
(
src_root
,
10
)):
...
...
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