Skip to content

kvserver: defer snapshot scratch cleanup to Store.Start#171293

Merged
trunk-io[bot] merged 1 commit into
cockroachdb:masterfrom
iskettaneh:rse_scratch
Jun 2, 2026
Merged

kvserver: defer snapshot scratch cleanup to Store.Start#171293
trunk-io[bot] merged 1 commit into
cockroachdb:masterfrom
iskettaneh:rse_scratch

Conversation

@iskettaneh
Copy link
Copy Markdown
Contributor

Move sstSnapshotStorage.Clear() till after
LoadAndReconcileReplicas (the future WAG-replay site). With separated engines, WAG replay can reference files in the scratch directory, so the cleanup must run after replay can consume them.

Clear() still runs before Transport.ListenIncomingRaftMessages, so no in-flight scratch directory is at risk.

Release note: None

Epic: None

@iskettaneh iskettaneh requested a review from pav-kv June 1, 2026 12:56
@iskettaneh iskettaneh requested a review from a team as a code owner June 1, 2026 12:56
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented Jun 1, 2026

😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Move sstSnapshotStorage.Clear() till after
LoadAndReconcileReplicas (the future WAG-replay site). With separated
engines, WAG replay can reference files in the scratch directory, so
the cleanup must run after replay can consume them.

Clear() still runs before Transport.ListenIncomingRaftMessages, so no
in-flight scratch directory is at risk.

Release note: None

Epic: None
@iskettaneh
Copy link
Copy Markdown
Contributor Author

TFTR!

/trunk merge

@trunk-io trunk-io Bot merged commit b8b50a4 into cockroachdb:master Jun 2, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants