Skip to content

lease keep alive return lease not found error#87

Merged
davidli2010 merged 5 commits intoetcdv3:masterfrom
messense:lease-not-found
Dec 21, 2024
Merged

lease keep alive return lease not found error#87
davidli2010 merged 5 commits intoetcdv3:masterfrom
messense:lease-not-found

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
@messense messense requested a review from davidli2010 December 21, 2024 13:02
@davidli2010 davidli2010 merged commit 453b1cb into etcdv3:master Dec 21, 2024
@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