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

lessor: extend leases on promote if expires will be rate limited #8149

Merged
merged 2 commits into from
Jun 22, 2017

Conversation

heyitsanthony
Copy link
Contributor

/cc @gyuho

@gyuho
Copy link
Contributor

gyuho commented Jun 21, 2017

LGTM. This is much better. Thanks!

Can we trigger semaphore again?
Don't know why it didn't trigger.

@heyitsanthony heyitsanthony force-pushed the lease-sort-promote branch 3 times, most recently from e938e48 to dc1048d Compare June 21, 2017 21:41
Anthony Romano added 2 commits June 22, 2017 11:25
Instead of unconditionally randomizing, extend leases on promotion
if too many leases expire within the same time span. If the server
has few leases or spread out expires, there will be no extension.
This reverts commit 95bc33f. The new
lease extension algorithm should pass this test.
@heyitsanthony
Copy link
Contributor Author

Failing on CI due to flakey test fixed in #8159. Merging.

@heyitsanthony heyitsanthony merged commit f7df3c8 into etcd-io:master Jun 22, 2017
@heyitsanthony heyitsanthony deleted the lease-sort-promote branch June 22, 2017 20:31
gyuho added a commit that referenced this pull request Jun 23, 2017
Instead of unconditionally randomizing, extend leases on promotion
if too many leases expire within the same time span. If the server
has few leases or spread out expires, there will be no extension.

Squashed previous commits for #8149.

This is a combination of 4 commits below:

lease: randomize expiry on initial refresh call

Randomize the very first expiry on lease recovery
to prevent recovered leases from expiring all at
the same time.

Address #8096.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>

integration: remove lease exist checking on randomized expiry

Lease with TTL 5 should be renewed with randomization,
thus it's still possible to exist after 3 seconds.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>

lessor: extend leases on promote if expires will be rate limited

Instead of unconditionally randomizing, extend leases on promotion
if too many leases expire within the same time span. If the server
has few leases or spread out expires, there will be no extension.

Revert "integration: remove lease exist checking on randomized expiry"

This reverts commit 95bc33f. The new
lease extension algorithm should pass this test.
gyuho added a commit that referenced this pull request Jun 23, 2017
Instead of unconditionally randomizing, extend leases on promotion
if too many leases expire within the same time span. If the server
has few leases or spread out expires, there will be no extension.

Squashed previous commits for #8149.

Author: Anthony Romano <anthony.romano@coreos.com>

This is a combination of 4 commits below:

lease: randomize expiry on initial refresh call

Randomize the very first expiry on lease recovery
to prevent recovered leases from expiring all at
the same time.

Address #8096.

integration: remove lease exist checking on randomized expiry

Lease with TTL 5 should be renewed with randomization,
thus it's still possible to exist after 3 seconds.

lessor: extend leases on promote if expires will be rate limited

Instead of unconditionally randomizing, extend leases on promotion
if too many leases expire within the same time span. If the server
has few leases or spread out expires, there will be no extension.

Revert "integration: remove lease exist checking on randomized expiry"

This reverts commit 95bc33f. The new
lease extension algorithm should pass this test.
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.

2 participants