Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Kirill Smelkov
ZODB
Commits
61500616
Commit
61500616
authored
Jan 10, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X Notes on loadBefore returning serial_next & None
parent
22df1fd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/ZODB/DemoStorage.py
src/ZODB/DemoStorage.py
+9
-0
No files found.
src/ZODB/DemoStorage.py
View file @
61500616
...
...
@@ -225,6 +225,14 @@ class DemoStorage(ConflictResolvingStorage):
return
self
.
base
.
loadBefore
(
oid
,
tid
)
if
result
is
None
:
# FIXME wrong: oid could be *deleted* in changes - in this case we
# must not look into base. Fix is: result = (data, serial)
#
# data = None if oid exists but there is no data (created later or deleted)
# serial = 0 (if created later) or serial of delete transaction.
#
# -> then look at serial and decide whether to go to base.
# The oid *was* in the changes, but there aren't any
# earlier records. Maybe there are in the base.
try
:
...
...
@@ -233,6 +241,7 @@ class DemoStorage(ConflictResolvingStorage):
# The oid isn't in the base, so None will be the right result
pass
else
:
# XXX vvv simply not needed if we don't need to return end_tid
if
result
and
not
result
[
-
1
]:
# The oid is current in the base. We need to find
# the end tid in the base by fining the first tid
...
...
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