Commit d5f63832 authored by Jürgen Gmach's avatar Jürgen Gmach

improve log message when client cache is out of sync with server

This fixes #142
parent 10778e12
......@@ -7,6 +7,9 @@ Changelog
- Fix data corruption due to race between load and external invalidations.
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)
------------------
......
......@@ -497,7 +497,10 @@ class Client(object):
elif cache_tid > server_tid:
self.verify_result = "Cache newer than server"
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",
server_tid, cache_tid, protocol)
elif cache_tid == server_tid:
......
......@@ -1147,7 +1147,7 @@ def client_has_newer_data_than_server():
>>> wait_until('got enough errors', lambda:
... len([x for x in handler.records
... 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)
Note that the errors repeat because the client keeps on trying to connect.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment