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
Vincent Pelletier
neoppod
Commits
c58d4862
Commit
c58d4862
authored
Apr 05, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: fix DatabaseManager.getLastTID with max_tid
parent
b10cc750
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
neo/storage/database/manager.py
neo/storage/database/manager.py
+2
-2
No files found.
neo/storage/database/manager.py
View file @
c58d4862
...
@@ -395,7 +395,7 @@ class DatabaseManager(object):
...
@@ -395,7 +395,7 @@ class DatabaseManager(object):
tids are in unpacked format.
tids are in unpacked format.
"""
"""
if
self
.
getNumPartitions
():
if
self
.
getNumPartitions
():
return
max
(
map
(
self
.
_getLastTID
,
self
.
_readable_set
)
)
return
max
(
self
.
_getLastTID
(
x
,
max_tid
)
for
x
in
self
.
_readable_set
)
def
_getLastIDs
(
self
,
partition
):
def
_getLastIDs
(
self
,
partition
):
"""Return max(tid) & max(oid) for objects of given partition
"""Return max(tid) & max(oid) for objects of given partition
...
@@ -415,7 +415,7 @@ class DatabaseManager(object):
...
@@ -415,7 +415,7 @@ class DatabaseManager(object):
x
=
self
.
_readable_set
x
=
self
.
_readable_set
if
x
:
if
x
:
tid
,
oid
=
zip
(
*
map
(
self
.
_getLastIDs
,
x
))
tid
,
oid
=
zip
(
*
map
(
self
.
_getLastIDs
,
x
))
tid
=
max
(
self
.
getLastTID
(
None
),
max
(
tid
))
tid
=
max
(
self
.
getLastTID
(),
max
(
tid
))
oid
=
max
(
oid
)
oid
=
max
(
oid
)
return
(
None
if
tid
is
None
else
util
.
p64
(
tid
),
return
(
None
if
tid
is
None
else
util
.
p64
(
tid
),
None
if
oid
is
None
else
util
.
p64
(
oid
))
None
if
oid
is
None
else
util
.
p64
(
oid
))
...
...
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