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
Kirill Smelkov
ZODB
Commits
d033a617
Commit
d033a617
authored
Aug 22, 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
5c004da1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
145 additions
and
124 deletions
+145
-124
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
+3
-9
No files found.
src/ZEO/ClientStorage.py
View file @
d033a617
...
...
@@ -1219,6 +1219,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 trasnactions 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 @
d033a617
This diff is collapsed.
Click to expand it.
src/ZEO/tests/zeo-fan-out.test
View file @
d033a617
...
...
@@ -4,7 +4,7 @@ ZEO Fan Out
We
should
be
able
to
set
up
ZEO
servers
with
ZEO
clients
.
Let
's see
if we can make it work.
We'
ll
use
some
helper functions. The first is a help
t
er that starts
We'
ll
use
some
helper functions. The first is a helper that starts
ZEO servers for us and another one that picks ports.
We'll start the first server:
...
...
@@ -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