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
nexedi
ZODB
Commits
77a84f9d
Commit
77a84f9d
authored
Jan 31, 2008
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First part of the fix for #181712.
parent
d6ff8d25
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
src/CHANGES.txt
src/CHANGES.txt
+3
-0
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+5
-4
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+21
-2
No files found.
src/CHANGES.txt
View file @
77a84f9d
...
@@ -35,6 +35,9 @@ New Features
...
@@ -35,6 +35,9 @@ New Features
Bugs Fixed
Bugs Fixed
----------
----------
- Fix for bug #181712: Make ClientStorage update `lastTransaction` directly
after connecting to a server, even when no cache verification is necessary.
- Fixed bug in blob filesystem helper: the `isSecure` check was inversed.
- Fixed bug in blob filesystem helper: the `isSecure` check was inversed.
- Fixed bug in transaction buffer: a tuple was unpacked incorrectly in
- Fixed bug in transaction buffer: a tuple was unpacked incorrectly in
...
...
src/ZEO/ClientStorage.py
View file @
77a84f9d
...
@@ -567,21 +567,22 @@ class ClientStorage(object):
...
@@ -567,21 +567,22 @@ class ClientStorage(object):
The return value (indicating which path we took) is used by
The return value (indicating which path we took) is used by
the test suite.
the test suite.
"""
"""
# If verify_cache() finishes the cache verification process,
# If verify_cache() finishes the cache verification process,
# it should set self._server. If it goes through full cache
# it should set self._server. If it goes through full cache
# verification, then endVerify() should self._server.
# verification, then endVerify() should set self._server.
ltid
=
server
.
lastTransaction
()
if
not
self
.
_cache
:
if
not
self
.
_cache
:
log2
(
"No verification necessary -- empty cache"
)
log2
(
"No verification necessary -- empty cache"
)
self
.
_server
=
server
self
.
_server
=
server
if
ltid
and
ltid
!=
utils
.
z64
:
self
.
_cache
.
setLastTid
(
ltid
)
self
.
_ready
.
set
()
self
.
_ready
.
set
()
return
"full verification"
return
"full verification"
last_inval_tid
=
self
.
_cache
.
getLastTid
()
last_inval_tid
=
self
.
_cache
.
getLastTid
()
if
last_inval_tid
is
not
None
:
if
last_inval_tid
is
not
None
:
ltid
=
server
.
lastTransaction
()
if
ltid
==
last_inval_tid
:
if
ltid
==
last_inval_tid
:
log2
(
"No verification necessary (last_inval_tid up-to-date)"
)
log2
(
"No verification necessary (last_inval_tid up-to-date)"
)
self
.
_server
=
server
self
.
_server
=
server
...
...
src/ZEO/tests/testZEO.py
View file @
77a84f9d
...
@@ -57,10 +57,12 @@ import ZEO.StorageServer
...
@@ -57,10 +57,12 @@ import ZEO.StorageServer
logger
=
logging
.
getLogger
(
'ZEO.tests.testZEO'
)
logger
=
logging
.
getLogger
(
'ZEO.tests.testZEO'
)
class
DummyDB
:
class
DummyDB
:
def
invalidate
(
self
,
*
args
):
def
invalidate
(
self
,
*
args
):
pass
pass
class
OneTimeTests
(
unittest
.
TestCase
):
class
OneTimeTests
(
unittest
.
TestCase
):
def
checkZEOVersionNumber
(
self
):
def
checkZEOVersionNumber
(
self
):
...
@@ -128,6 +130,23 @@ class MiscZEOTests:
...
@@ -128,6 +130,23 @@ class MiscZEOTests:
finally
:
finally
:
storage2
.
close
()
storage2
.
close
()
def
checkVolatileCacheWithImmediateLastTransaction
(
self
):
# Earlier, a ClientStorage would not have the last transaction id
# available right after successful connection, this is required now.
addr
=
self
.
_storage
.
_addr
storage2
=
ClientStorage
(
addr
)
self
.
assert_
(
storage2
.
is_connected
())
self
.
assertEquals
(
None
,
storage2
.
lastTransaction
())
storage2
.
close
()
self
.
_dostore
()
storage3
=
ClientStorage
(
addr
)
self
.
assert_
(
storage3
.
is_connected
())
self
.
assertEquals
(
8
,
len
(
storage3
.
lastTransaction
()))
self
.
assertNotEquals
(
ZODB
.
utils
.
z64
,
storage3
.
lastTransaction
())
storage3
.
close
()
def
get_port
():
def
get_port
():
"""Return a port that is not in use.
"""Return a port that is not in use.
...
...
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