storage: create cluster setting for a minimum lease transfer interval#42724
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Nov 25, 2019
Merged
Conversation
Member
ajwerner
approved these changes
Nov 25, 2019
Contributor
ajwerner
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status:complete! 1 of 0 LGTMs obtained
Contributor
Author
|
bors r+ |
Contributor
Build failed (retrying...) |
Contributor
Build failed |
This minimum interval was previously set to 1 second in a constant, which was frustrating when setting up datasets with lease preferences. This change turns the interval into a configurable cluster setting so that it can be changed on-demand. This value also seems fairly high, but to avoid causing any instability or thrashing I opted not to touch the default for the new cluster setting. Release note (sql change): A new kv.allocator.min_lease_transfer_interval cluster setting was introduced, which allows the minimum interval between lease transfers initiated from each node to be configured.
9708a70 to
39f24ea
Compare
Contributor
Author
|
Needed to rebase to pick up changes to bors r+ |
craig bot
pushed a commit
that referenced
this pull request
Nov 25, 2019
42379: storage: remove the replica up to date check when transfering lease r=darinpp a=darinpp Previously, we had a check that filtered out all replicas that are lagging behind the leader in case of a lease transfer. We remove that check so in case of lease preference for a node that is constantly lagging - the lease transfer can occur without delay. This removes the check that the candidates for lease transfer are only replicas that aren't lagging behind. etcd implements the 3.10 Leadership transfer extension where the old leader will bring up to date the new leader's log while blocking any new requests. Release note (bug fix): now possible to transfer range leases to lagging replicas 42724: storage: create cluster setting for a minimum lease transfer interval r=nvanbenschoten a=nvanbenschoten This minimum interval was previously set to 1 second in a constant, which was frustrating when setting up datasets with lease preferences. This change turns the interval into a configurable cluster setting so that it can be changed on-demand. This value also seems fairly high, but to avoid causing any instability or thrashing I opted not to touch the default for the new cluster setting. Release note (sql change): A new kv.allocator.min_lease_transfer_interval cluster setting was introduced, which allows the minimum interval between lease transfers initiated from each node to be configured. Co-authored-by: Darin <darinp@gmail.com> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
Contributor
Build succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This minimum interval was previously set to 1 second in a constant, which was frustrating when setting up datasets with lease preferences. This change turns the interval into a configurable cluster setting so that it can be changed on-demand.
This value also seems fairly high, but to avoid causing any instability or thrashing I opted not to touch the default for the new cluster setting.
Release note (sql change): A new kv.allocator.min_lease_transfer_interval cluster setting was introduced, which allows the minimum interval between lease transfers initiated from each node to be configured.