-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add SETIFGREATER ETag command #968
base: main
Are you sure you want to change the base?
Add SETIFGREATER ETag command #968
Conversation
|
||
/// <summary> | ||
/// SETIFGREATER key val etag [EX|PX] [expiry] | ||
/// Sets a key value pair with the given ETag only if the already existing etag is less than the etag given in request. |
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.
Reword as:
Sets a key value pair with the given etag only if (1) the etag given in the request is greater than the already existing etag ; or (2) there was no existing value; or (3) the existing value was not associated with any etag.
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.
SetIfGreater on non-existing value returns nil, same as SETIFMATCH
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.
so 1 and 3 are correct but not 2^
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.
it should be true, right? otherwise client has to special case the first insert which is wasteful. (we think of the default etag and non-existent etag as zero implicitly)
630ec0d
to
c38526e
Compare
Adds the SETIFGREATER ETag command along with documentation and testing