Skip to content

kvserver: increase snapshot timeout and use envvar #76589

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

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Feb 15, 2022

This patch increases the default snapshot transfer timeout from 20
minutes to 1 hour, to be more lenient, and adds an environment variable
COCKROACH_RAFT_SEND_SNAPSHOT_TIMEOUT as an escape hatch.

Touches #76295.

Release note (bug fix): There is now a 1 hour timeout when sending Raft
snapshots, to avoid stalled snapshot transfers preventing Raft log
truncation and growing the Raft log very large. This is configurable via
the COCKROACH_RAFT_SEND_SNAPSHOT_TIMEOUT environment variable.

@erikgrinaker erikgrinaker requested a review from tbg February 15, 2022 16:42
@erikgrinaker erikgrinaker self-assigned this Feb 15, 2022
@erikgrinaker erikgrinaker requested a review from a team as a code owner February 15, 2022 16:42
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@aayushshah15 aayushshah15 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @erikgrinaker and @tbg)


-- commits, line 8 at r1:
Drive-by comment: since the 20min timeout was never released, should this release note just be talking about the fact that now this new env var can be used to set a general timeout?

Copy link
Contributor Author

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @aayushshah15 and @tbg)


-- commits, line 8 at r1:

Previously, aayushshah15 (Aayush Shah) wrote…

Drive-by comment: since the 20min timeout was never released, should this release note just be talking about the fact that now this new env var can be used to set a general timeout?

Yeah. I figured I'd have to coordinate with docs anyway to undo the 20 minute release note (since the timeout is no longer 20 minutes), but I can word this independently and figure out how to nullify the old one.

This patch increases the default snapshot transfer timeout from 20
minutes to 1 hour, to be more lenient, and adds an environment variable
`COCKROACH_RAFT_SEND_SNAPSHOT_TIMEOUT` as an escape hatch.

Release note (bug fix): There is now a 1 hour timeout when sending Raft
snapshots, to avoid stalled snapshot transfers preventing Raft log
truncation and growing the Raft log very large. This is configurable via
the `COCKROACH_RAFT_SEND_SNAPSHOT_TIMEOUT` environment variable.
@erikgrinaker erikgrinaker force-pushed the send-snapshot-timeout-envvar branch from 9e4c3aa to 23c673e Compare February 15, 2022 16:56
@erikgrinaker
Copy link
Contributor Author

bors r=tbg

@craig
Copy link
Contributor

craig bot commented Feb 16, 2022

Build succeeded:

@craig craig bot merged commit 13c5a25 into cockroachdb:master Feb 16, 2022
@erikgrinaker erikgrinaker deleted the send-snapshot-timeout-envvar branch March 4, 2022 14:05
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.

4 participants