-
Notifications
You must be signed in to change notification settings - Fork 55
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
couchbase: add CAS support #86
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this great contribution @sapk! I've left a couple of comments and suggestions. Mostly some minor grammar and spelling fixes. Also, feel free to discard any nit
comments.
I'm curious whether we should be allowing for these CAS checks to be toggled via the config instead of making a user clear out metadata fields with bloblang. Not super familiar with Couchbase though so maybe it's more desirable to attach these values by default (like what your PR is currently doing). Let me know your thoughts on this.
Co-authored-by: Greg Furman <31275503+gregfurman@users.noreply.github.com>
It should be good now. |
@sapk Thanks for the follow-up! I added one small suggestion for the docs to no longer include that |
Co-authored-by: Greg Furman <31275503+gregfurman@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Set and use Couchbase CAS in metadata
couchbase_cas
to prevent write conflict.If an entry is modified by an other process between read and write it will return an error if CAS is mismatched.
This change should be transparent and prevent data loss by default.
This check can be disabled by clearing the CAS value if needed.