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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
d5f63832
Commit
d5f63832
authored
Apr 23, 2021
by
Jürgen Gmach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve log message when client cache is out of sync with server
This fixes #142
parent
10778e12
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGES.rst
CHANGES.rst
+3
-0
src/ZEO/asyncio/client.py
src/ZEO/asyncio/client.py
+4
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+1
-1
No files found.
CHANGES.rst
View file @
d5f63832
...
@@ -7,6 +7,9 @@ Changelog
...
@@ -7,6 +7,9 @@ Changelog
- Fix data corruption due to race between load and external invalidations.
- Fix data corruption due to race between load and external invalidations.
See `issue 155 <https://github.com/zopefoundation/ZEO/issues/155>`_.
See `issue 155 <https://github.com/zopefoundation/ZEO/issues/155>`_.
- Improve log message when client cache is out of sync with server.
See `issue 142 <https://github.com/zopefoundation/ZEO/issues/142>`_.
5.2.2 (2020-08-11)
5.2.2 (2020-08-11)
------------------
------------------
...
...
src/ZEO/asyncio/client.py
View file @
d5f63832
...
@@ -497,7 +497,10 @@ class Client(object):
...
@@ -497,7 +497,10 @@ class Client(object):
elif
cache_tid
>
server_tid
:
elif
cache_tid
>
server_tid
:
self
.
verify_result
=
"Cache newer than server"
self
.
verify_result
=
"Cache newer than server"
logger
.
critical
(
logger
.
critical
(
'Client has seen newer transactions than server!'
)
'Client cache is out of sync with the server. '
'Verify that this is expected and then remove '
'the cache file (usually a .zec file) '
'before restarting the server.'
)
raise
AssertionError
(
"Server behind client, %r < %r, %s"
,
raise
AssertionError
(
"Server behind client, %r < %r, %s"
,
server_tid
,
cache_tid
,
protocol
)
server_tid
,
cache_tid
,
protocol
)
elif
cache_tid
==
server_tid
:
elif
cache_tid
==
server_tid
:
...
...
src/ZEO/tests/testZEO.py
View file @
d5f63832
...
@@ -1147,7 +1147,7 @@ def client_has_newer_data_than_server():
...
@@ -1147,7 +1147,7 @@ def client_has_newer_data_than_server():
>>> wait_until('got enough errors', lambda:
>>> wait_until('got enough errors', lambda:
... len([x for x in handler.records
... len([x for x in handler.records
... if x.levelname == 'CRITICAL' and
... if x.levelname == 'CRITICAL' and
... 'Client
has seen newer transactions than server!
' in x.msg
... 'Client
cache is out of sync with the server.
' in x.msg
... ]) >= 2)
... ]) >= 2)
Note that the errors repeat because the client keeps on trying to connect.
Note that the errors repeat because the client keeps on trying to connect.
...
...
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