New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clientv3 watch retry may watch a compacted revision. #8668
Comments
compaction error should not be auto resumed, and it cannot in theory. if you believe it is not the case, can you write a test to demonstrate that? |
add print info to server code:
test case: test.go
Test Procedure:
result:
|
this exactly what should happen. watcher must not silently miss an event. what you did is to partition the watcher, put some new keys, compact at head. and when you recovered the watcher, the watcher has no way to transparently catch up from where it was. so the error is returned. this is expected. reopen if i missed anything. |
@xiang90 If compact happen when re-watch, how to avoid watch fail? After compact, next watch revision is behind compact revision, watch must fail. |
@YuleiXiao the watcher is canceled. you need to start from head or any non-compacted version. |
@xiang90 If watch from head, we missed event from last watch revision to head. Application only can get latest revision. |
@YuleiXiao Yea... If you do not want to miss anything do not compact so fast... When you delete a file, you wont be able to find it anymore. Compaction works just like that. |
if watch client receive some error response, all watcherStreams should begin resuming. Compaction operation of server may lead to resume failed, becase maybe watchStream.watchRequest.rev is less than compacted revision.
The text was updated successfully, but these errors were encountered: