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

api: lease comparison target #8324

Merged
merged 6 commits into from
Jul 31, 2017
Merged

Conversation

heyitsanthony
Copy link
Contributor

It's useful to perform some atomic actions based on leases. For disconnected linearized reads, keys with ttls can't be easily leased since if the client is disconnected it doesn't know whether the ttl expires. Although there could be a Get in the leasing txn to later undo the leasing if the key turns out to have a ttl, this is inefficient and less reliable than gating it at the txn level.

I've omitted clientv3 support for the time being since calling the comparison function Lease to follow the current convention would conflict with the lease interface

// range_end compares the given target to all keys in the range [key, range_end).
// See RangeRequest for more details on key ranges.
bytes range_end = 8;
bytes range_end = 64;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this field is not in any release yet, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, caught it early

@xiang90
Copy link
Contributor

xiang90 commented Jul 28, 2017

do we also need to update etcdctl?

@heyitsanthony
Copy link
Contributor Author

OK added etcdctl support

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@xiang90
Copy link
Contributor

xiang90 commented Jul 28, 2017

lgtm

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.

3 participants