-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Optimize Watches #3826
Comments
A client cancelling a watch should cause a "soft" cancel. A soft cancel means instead of sending an RPC to the storage server telling it to cancel the watch, a flag will be set on the watch. This flag will instruct the watch to not renew itself when it times out on the storage server, and to not deliver any messages if triggered. On timeout, the watch should be cleaned up. |
The motivation for what Lukas' said is the following: |
I believe that setting a watch also involves reading the key being watched. This may still be necessary in the proposed change to avoid the case where there is a race between you re-enabling a watch and the watch triggering due to a change preceding your transaction. |
Yes, a client would still need to read it. Basically we will first need a change to roll forward the version at which a watch is on the client side (if a value didn't change between versions |
Benchmarks measuring these improvements can be found in this doc |
FDB Watches currently are not as cheap as they could be. We should consider making the following optimizations:
The text was updated successfully, but these errors were encountered: