-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: implement atomic operations #300
Conversation
Add the following gRPC methods - CompareAndSwap - CompareAndSwapGreater - CompareAndSwapLess - AtomicAdd - AtomicSub - AtomicInc - AtomicDec
I'm not sure if these method names are good or do we want to clarify that they are for properties? |
I think we should name these methods as |
So I did the rename, also changed some of the messages so that they would be easier to use.
PTAL, thanks. |
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.
I have added a few suggestions to keep the function names less cryptic and more streamlined. I do not feel strongly about them, except for the AtomicIncInt and AtomicDecInt, which is really confusing when reading the implementation with function names such as doAtomicIncDec (maybe rename to doAtomicOperation).
Did the renames according to our discussion.
The rationale is that inc/dec is always performed on integers. |
What type of PR is this?
/kind feat
What this PR does / Why we need it:
Add the following gRPC methods
Which issue(s) this PR fixes:
Closes #134
Special notes for your reviewer: