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

lease keep alive return lease not found error #87

Merged
merged 5 commits into from
Dec 21, 2024

Conversation

messense
Copy link
Contributor

@messense messense commented Dec 17, 2024

Currently lease_keep_alive returns lease keeper and keep alive stream even when the lease id is not found or revoked, in such case LeaseKeeper.keep_alive will not return error and the keep alive stream will yield nothing, so we can't identify that the lease id is invalid.

This patch changes lease_keep_alive to return an error when the lease_id argument passed has ttl <= 0 (which means it's expired or revoked, in other words not found).

See also https://github.com/etcd-io/etcd/blob/b4450d510ddf0f011c874c28e95175b4bac7f6c8/client/v3/lease.go#L323-L325

@messense messense marked this pull request as ready for review December 17, 2024 11:38
src/rpc/lease.rs Outdated Show resolved Hide resolved
build.rs Show resolved Hide resolved
@messense messense requested a review from davidli2010 December 21, 2024 13:02
@davidli2010 davidli2010 merged commit 453b1cb into etcdv3:master Dec 21, 2024
1 check passed
@messense messense deleted the lease-not-found branch December 21, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants