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
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
Nicolas Wavrant
ZODB
Commits
04626c4e
Commit
04626c4e
authored
Sep 05, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a client-storage check to make sure a client doesn't connect to
an out-of-date server.
parent
b1e8c210
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
123 deletions
+144
-123
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+4
-0
src/ZEO/tests/ConnectionTests.py
src/ZEO/tests/ConnectionTests.py
+138
-115
src/ZEO/tests/zeo-fan-out.test
src/ZEO/tests/zeo-fan-out.test
+2
-8
No files found.
src/ZEO/ClientStorage.py
View file @
04626c4e
...
...
@@ -1206,6 +1206,10 @@ class ClientStorage(object):
log2
(
"No verification necessary (last_inval_tid up-to-date)"
)
self
.
finish_verification
()
return
"no verification"
elif
ltid
<
last_inval_tid
:
message
=
"Client has seen newer transactions than server!"
log2
(
message
,
level
=
logging
.
CRITICAL
)
raise
ClientStorageError
(
message
)
# log some hints about last transaction
log2
(
"last inval tid: %r %s
\
n
"
...
...
src/ZEO/tests/ConnectionTests.py
View file @
04626c4e
This diff is collapsed.
Click to expand it.
src/ZEO/tests/zeo-fan-out.test
View file @
04626c4e
...
...
@@ -13,7 +13,8 @@ We'll start the first server:
>>> port0 = ZEO.tests.testZEO.get_port()
>>> zconf0 = ZEO.tests.forker.ZEOConfig(('', port0))
>>> zport0, adminaddr0, pid0, path0 = ZEO.tests.forker.start_zeo_server(
... '<filestorage 1>\n path fs\n</filestorage>\n', zconf0, port0)
... '<filestorage 1>\n path fs\n</filestorage>\n', zconf0,
... port0, keep=1)
Then we'll start 2 others that use this one:
...
...
@@ -56,13 +57,6 @@ And some databases and connections around these:
>>> r2
{}
>>> db2 = DB(cs2)
>>> tm2 = transaction.TransactionManager()
>>> c2 = db2.open(transaction_manager=tm2)
>>> r2 = c2.root()
>>> r2
{}
If we update c1, we'll eventually see the change in c2:
>>> import persistent.mapping
...
...
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