Skip to content
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

mvcc: update minRev when watcher stays synced #15439

Closed
wants to merge 1 commit into from

Conversation

lavacat
Copy link

@lavacat lavacat commented Mar 9, 2023

Problem: during restore in watchableStore.Restore, synced watchers are moved to unsynced. minRev will be behind since it's not updated when watcher stays synced.

Solution: update minRev

fixes: #15271

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

Problem: during restore in watchableStore.Restore, synced watchers are moved to unsynced.
minRev will be behind since it's not updated when watcher stays synced.

Solution: update minRev

fixes: etcd-io#15271
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
@lavacat
Copy link
Author

lavacat commented Mar 9, 2023

@serathius I've tested that this fixes https://github.com/etcd-io/etcd/pull/15273/files
Without the fix, test fails, with the fix it succeeds consistently.

I've marked this PR as draft because I'm not yet fluent with all logic for syncWatchers. Also, I'd like to add an integration test.

For ref:
minRev was added here

Restore logic was added here

@xiang90
Copy link
Contributor

xiang90 commented Mar 10, 2023

We should probably add a test case to ensure the coverage.

@serathius
Copy link
Member

cc @logicalhan

@serathius
Copy link
Member

Any progress?

@serathius
Copy link
Member

Confirmed that this fixes #15271

@serathius
Copy link
Member

Created #15492 based on this

@serathius serathius closed this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Watch response traveling back in time when reconnecting member downloads snapshot from the leader
3 participants