Skip to content

Add docs for leader-leaseholder splits #19755

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rmloveland
Copy link
Contributor

Fixes DOC-13920

@rmloveland rmloveland requested a review from miraradeva June 11, 2025 19:09
Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 444ba5b
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/6851adc01d397100089ddc9d

Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 444ba5b
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/6851adc0993425000854a6d9

@rmloveland
Copy link
Contributor Author

hi @miraradeva i hope PR this captures the gist of our convo (which i copied to the linked docs ticket)

but please let me know if i'm missing some important information, or if anything is incorrect

Copy link

@miraradeva miraradeva left a comment

Choose a reason for hiding this comment

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

Look great, thanks!

Copy link

netlify bot commented Jun 11, 2025

Netlify Preview

Name Link
🔨 Latest commit 444ba5b
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/6851adc01d397100089ddc99
😎 Deploy Preview https://deploy-preview-19755--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rmloveland
Copy link
Contributor Author

rmloveland commented Jun 17, 2025

Look great, thanks!

thanks @miraradeva ! I have made updates based on your feedback in 7c1d5cf, thank you for the review!

i will move this along for docs team review to get it published ASAP

@rmloveland rmloveland requested a review from taroface June 17, 2025 15:56
Copy link
Contributor

@taroface taroface left a comment

Choose a reason for hiding this comment

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

LGTM, couple suggestions

@@ -160,6 +160,15 @@ Unlike table data, system ranges use expiration-based leases; expiration-based l

Expiration-based leases are also used temporarily during operations like lease transfers, until the new Raft leader can be fortified based on store liveness, as described in [Leader leases](#leader-leases).

#### Leader‑leaseholder splits

[Epoch-based leases](#epoch-based-leases) are vulnerable to _leader-leaseholder splits_. These can occur when a leaseholder’s Raft log has fallen behind and cannot acquire Raft leadership. Coupled with a [network partition]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#network-partition), this split can cause permanent unavailability of the range if (1) the stale leaseholder continues heartbeating the [liveness range](#liveness-range) to hold its lease but (2) cannot reach the leader to propose writes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace all smart quotes

Suggested change
[Epoch-based leases](#epoch-based-leases) are vulnerable to _leader-leaseholder splits_. These can occur when a leaseholders Raft log has fallen behind and cannot acquire Raft leadership. Coupled with a [network partition]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#network-partition), this split can cause permanent unavailability of the range if (1) the stale leaseholder continues heartbeating the [liveness range](#liveness-range) to hold its lease but (2) cannot reach the leader to propose writes.
[Epoch-based leases](#epoch-based-leases) are vulnerable to _leader-leaseholder splits_. These can occur when a leaseholder's Raft log has fallen behind and cannot acquire Raft leadership. Coupled with a [network partition]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#network-partition), this split can cause permanent unavailability of the range if (1) the stale leaseholder continues heartbeating the [liveness range](#liveness-range) to hold its lease but (2) cannot reach the leader to propose writes.

Copy link
Contributor

Choose a reason for hiding this comment

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

I might just be tired at the moment, but "Raft log has fallen behind" might be unclear as to "what" the Raft log has fallen behind.

@@ -320,7 +320,7 @@ Send an alert when the number of ranges with replication below the replication f

### Requests stuck in raft
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Requests stuck in raft
### Requests stuck in Raft

@@ -160,6 +160,15 @@ Unlike table data, system ranges use expiration-based leases; expiration-based l

Expiration-based leases are also used temporarily during operations like lease transfers, until the new Raft leader can be fortified based on store liveness, as described in [Leader leases](#leader-leases).

#### Leader‑leaseholder splits

[Epoch-based leases](#epoch-based-leases) are vulnerable to _leader-leaseholder splits_. These can occur when a leaseholder’s Raft log has fallen behind and cannot acquire Raft leadership. Coupled with a [network partition]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#network-partition), this split can cause permanent unavailability of the range if (1) the stale leaseholder continues heartbeating the [liveness range](#liveness-range) to hold its lease but (2) cannot reach the leader to propose writes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct / worth adding?

Suggested change
[Epoch-based leases](#epoch-based-leases) are vulnerable to _leader-leaseholder splits_. These can occur when a leaseholder’s Raft log has fallen behind and cannot acquire Raft leadership. Coupled with a [network partition]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#network-partition), this split can cause permanent unavailability of the range if (1) the stale leaseholder continues heartbeating the [liveness range](#liveness-range) to hold its lease but (2) cannot reach the leader to propose writes.
[Epoch-based leases](#epoch-based-leases) (unlike [Leader leases](#leader-leases)) are vulnerable to _leader-leaseholder splits_. These can occur when a leaseholder’s Raft log has fallen behind and cannot acquire Raft leadership. Coupled with a [network partition]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#network-partition), this split can cause permanent unavailability of the range if (1) the stale leaseholder continues heartbeating the [liveness range](#liveness-range) to hold its lease but (2) cannot reach the leader to propose writes.

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