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
ca480ebd
Commit
ca480ebd
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
e61af093
Changes
3
Hide 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 @
ca480ebd
...
...
@@ -35,6 +35,9 @@ New Features
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 transaction buffer: a tuple was unpacked incorrectly in
...
...
src/ZEO/ClientStorage.py
View file @
ca480ebd
...
...
@@ -567,21 +567,22 @@ class ClientStorage(object):
The return value (indicating which path we took) is used by
the test suite.
"""
# If verify_cache() finishes the cache verification process,
# 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
:
log2
(
"No verification necessary -- empty cache"
)
self
.
_server
=
server
if
ltid
and
ltid
!=
utils
.
z64
:
self
.
_cache
.
setLastTid
(
ltid
)
self
.
_ready
.
set
()
return
"full verification"
last_inval_tid
=
self
.
_cache
.
getLastTid
()
if
last_inval_tid
is
not
None
:
ltid
=
server
.
lastTransaction
()
if
ltid
==
last_inval_tid
:
log2
(
"No verification necessary (last_inval_tid up-to-date)"
)
self
.
_server
=
server
...
...
src/ZEO/tests/testZEO.py
View file @
ca480ebd
...
...
@@ -57,10 +57,12 @@ import ZEO.StorageServer
logger
=
logging
.
getLogger
(
'ZEO.tests.testZEO'
)
class
DummyDB
:
def
invalidate
(
self
,
*
args
):
pass
class
OneTimeTests
(
unittest
.
TestCase
):
def
checkZEOVersionNumber
(
self
):
...
...
@@ -128,6 +130,23 @@ class MiscZEOTests:
finally
:
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
():
"""Return a port that is not in use.
...
...
@@ -645,9 +664,9 @@ class BlobAdaptedFileStorageTests(GenericTests, CommonBlobTests):
]
[
thread
.
start
()
for
thread
in
threads
]
[
thread
.
join
()
for
thread
in
threads
]
[
self
.
assertEqual
(
r
,
filename
)
for
r
in
returns
]
[
self
.
assertEqual
(
r
,
filename
)
for
r
in
returns
]
check_data
(
filename
)
class
BlobWritableCacheTests
(
GenericTests
,
CommonBlobTests
):
...
...
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