Skip to content

storage: create cluster setting for a minimum lease transfer interval#42724

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/minLeaseTransferInterval
Nov 25, 2019
Merged

storage: create cluster setting for a minimum lease transfer interval#42724
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/minLeaseTransferInterval

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Nov 25, 2019

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.

@nvb nvb requested a review from ajwerner November 25, 2019 01:29
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Nov 25, 2019

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 25, 2019

Build failed (retrying...)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 25, 2019

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.
@nvb nvb force-pushed the nvanbenschoten/minLeaseTransferInterval branch from 9708a70 to 39f24ea Compare November 25, 2019 18:09
@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Nov 25, 2019

Needed to rebase to pick up changes to docs/generated/settings/settings.html.

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>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 25, 2019

Build succeeded

@craig craig bot merged commit 39f24ea into cockroachdb:master Nov 25, 2019
@nvb nvb deleted the nvanbenschoten/minLeaseTransferInterval branch December 27, 2019 22:59
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.

3 participants