Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Kirill Smelkov
ZEO
Commits
2952501b
Commit
2952501b
authored
Jun 15, 2016
by
Jim Fulton
Committed by
GitHub
Jun 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25 from zopefoundation/zodb5
Zodb5
parents
6d05cc16
b793437a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+13
-2
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+1
-1
No files found.
src/ZEO/ClientStorage.py
View file @
2952501b
...
...
@@ -1119,7 +1119,8 @@ class ClientStorage(object):
self
.
_tpc_cond
.
release
()
def
lastTransaction
(
self
):
return
self
.
_cache
.
getLastTid
()
with
self
.
_lock
:
return
self
.
_cache
.
getLastTid
()
def
tpc_abort
(
self
,
txn
):
"""Storage API: abort a transaction."""
...
...
@@ -1388,6 +1389,15 @@ class ClientStorage(object):
for
oid
,
tid
in
self
.
_cache
.
contents
():
server
.
verify
(
oid
,
tid
)
server
.
endZeoVerify
()
with
self
.
_lock
:
if
server_tid
>
self
.
_cache
.
getLastTid
():
# We verified the cache, and got no new invalidations
# while doing so. The records in the cache are valid,
# in that invalid current records were invalidated,
# but the last tid is wrong. Let's fix it:
self
.
_cache
.
setLastTid
(
server_tid
)
return
"full verification"
def
invalidateVerify
(
self
,
oid
):
...
...
@@ -1465,11 +1475,12 @@ class ClientStorage(object):
if
oid
==
self
.
_load_oid
:
self
.
_load_status
=
0
self
.
_cache
.
invalidate
(
oid
,
tid
)
self
.
_cache
.
setLastTid
(
tid
)
if
self
.
_db
is
not
None
:
self
.
_db
.
invalidate
(
tid
,
oids
)
self
.
_cache
.
setLastTid
(
tid
)
# The following are for compatibility with protocol version 2.0.0
def
invalidateTrans
(
self
,
oids
):
...
...
src/ZEO/tests/testZEO.py
View file @
2952501b
...
...
@@ -1468,9 +1468,9 @@ But, if we abort, we'll get up to date data and we'll see the changes.
>>> sorted(conn2.root.x.items())
[('x', 1), ('y', 1)]
>>> conn2.close()
>>> cs.close()
>>> conn1.close()
"""
...
...
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