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

kv: support migration between lease types #125241

Closed
nvanbenschoten opened this issue Jun 6, 2024 · 1 comment · Fixed by #130700
Closed

kv: support migration between lease types #125241

nvanbenschoten opened this issue Jun 6, 2024 · 1 comment · Fixed by #130700
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. A-leader-leases Related to the introduction of leader leases C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team

Comments

@nvanbenschoten
Copy link
Member

nvanbenschoten commented Jun 6, 2024

Part of #123847.

It should be possible and safe to switch back and forth between epoch-based leases and leader leases.

Jira issue: CRDB-39332

Epic CRDB-37522

@nvanbenschoten nvanbenschoten added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-kv-replication Relating to Raft, consensus, and coordination. T-kv KV Team A-leader-leases Related to the introduction of leader leases labels Jun 6, 2024
@nvanbenschoten nvanbenschoten self-assigned this Jun 6, 2024
Copy link

blathers-crl bot commented Jun 6, 2024

cc @cockroachdb/replication

@github-project-automation github-project-automation bot moved this to Incoming in KV Aug 28, 2024
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this issue Sep 19, 2024
Fixes cockroachdb#125241.

This commit adds support for switching between epoch-based leases and
leader leases dynamically, based on the current values of the following
two cluster settings:
* `kv.raft.leader_fortification.fraction_enabled` (public)
* `kv.leases.leader_leases.enabled` (private)

When either of these settings is changed, the lease queue will start
switching the types of leases that no longer match their range's desired
lease type. These changes will be spread across a scanner cycle, so we
shouldn't see serious disruption to the cluster.

Release note: None
craig bot pushed a commit that referenced this issue Sep 26, 2024
130700: kv: support migration between lease types r=nvanbenschoten a=nvanbenschoten

Fixes #125241.

This commit adds support for switching between epoch-based leases and leader leases dynamically, based on the current values of the following two cluster settings:
* `kv.raft.leader_fortification.fraction_enabled` (public)
* `kv.leases.leader_leases.enabled` (private)

When either of these settings is changed, the lease queue will start switching the types of leases that no longer match their range's desired lease type. These changes will be spread across a scanner cycle, so we shouldn't see serious disruption to the cluster.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig craig bot closed this as completed in 4b552e6 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. A-leader-leases Related to the introduction of leader leases C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
No open projects
Status: Incoming
Development

Successfully merging a pull request may close this issue.

1 participant