Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
b8666c09
Commit
b8666c09
authored
Jun 24, 2020
by
Joshua Woelfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem with initializing db's latest state field
parent
1c1688c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
lib/zodb.py
lib/zodb.py
+9
-8
No files found.
lib/zodb.py
View file @
b8666c09
...
...
@@ -179,19 +179,18 @@ def zconn_at(zconn): # -> tid
raise
AssertionError
(
"zconn_at: TODO: add support for zstor %r"
%
zstor
)
# ZODB3, ZODB4
#
# If historic connection, convert and return zconn.before. Otherwise
# returns tid of last transaction, if viewing latest db state, or if
# later db state exists, returns tid of db state previous to later
# state
else
:
elif
zmajor
==
4
:
if
not
zconn
.
before
zconn
.
_inv_lock
.
acquire
()
try
:
viewed_state
=
zconn
.
viewed_db_state
finally
:
zconn
.
_inv_lock
.
release
()
return
viewed_state
# TODO ZODB3
else
:
pass
# before2at converts tid that specifies database state as "before" into tid that
# specifies database state as "at".
...
...
@@ -342,7 +341,9 @@ if zmajor == 4:
self
.
history
(
z64
)
self
.
_a
()
try
:
if
self
.
latest_state
is
None
:
# initialize latest_state with last_tid if not yet initialized
# during invalidation process
if
not
hasattr
(
self
,
'latest_state'
):
self
.
latest_state
=
last_tid
finally
:
self
.
_r
()
...
...
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