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
Show 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,13 +179,8 @@ def zconn_at(zconn): # -> tid
...
@@ -179,13 +179,8 @@ def zconn_at(zconn): # -> tid
raise
AssertionError
(
"zconn_at: TODO: add support for zstor %r"
%
zstor
)
raise
AssertionError
(
"zconn_at: TODO: add support for zstor %r"
%
zstor
)
# ZODB3, ZODB4
elif
zmajor
==
4
:
#
if
not
zconn
.
before
# 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
:
zconn
.
_inv_lock
.
acquire
()
zconn
.
_inv_lock
.
acquire
()
try
:
try
:
viewed_state
=
zconn
.
viewed_db_state
viewed_state
=
zconn
.
viewed_db_state
...
@@ -193,6 +188,10 @@ def zconn_at(zconn): # -> tid
...
@@ -193,6 +188,10 @@ def zconn_at(zconn): # -> tid
zconn
.
_inv_lock
.
release
()
zconn
.
_inv_lock
.
release
()
return
viewed_state
return
viewed_state
# TODO ZODB3
else
:
pass
# before2at converts tid that specifies database state as "before" into tid that
# before2at converts tid that specifies database state as "before" into tid that
# specifies database state as "at".
# specifies database state as "at".
def
before2at
(
before
):
# -> at
def
before2at
(
before
):
# -> at
...
@@ -342,7 +341,9 @@ if zmajor == 4:
...
@@ -342,7 +341,9 @@ if zmajor == 4:
self
.
history
(
z64
)
self
.
history
(
z64
)
self
.
_a
()
self
.
_a
()
try
:
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
self
.
latest_state
=
last_tid
finally
:
finally
:
self
.
_r
()
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