Skip to content

Always use temporary staging for filestore meta file writes#7388

Merged
neilalexander merged 1 commit intomainfrom
neil/fspivot
Oct 2, 2025
Merged

Always use temporary staging for filestore meta file writes#7388
neilalexander merged 1 commit intomainfrom
neil/fspivot

Conversation

@neilalexander
Copy link
Copy Markdown
Member

This provides better crash-resilience during interrupted filesystem operations, i.e. where writing meta.inf/meta.sum/index.db is interrupted with O_TRUNC leaving behind an empty file.

Signed-off-by: Neil Twigg neil@nats.io

@neilalexander neilalexander requested a review from a team as a code owner October 2, 2025 11:28
@sciascid
Copy link
Copy Markdown
Contributor

sciascid commented Oct 2, 2025

I was going to suggest something similar. In the end I didn't, because I thought that the current approach may work for small files, like Raft's term and vote file for example. As single sector overwrites are typically atomic.

This may be an interesting read: https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-pillai.pdf
See section 2.2.1

Signed-off-by: Neil Twigg <neil@nats.io>
Copy link
Copy Markdown
Contributor

@sciascid sciascid left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander merged commit a794862 into main Oct 2, 2025
69 of 70 checks passed
@neilalexander neilalexander deleted the neil/fspivot branch October 2, 2025 15:23
neilalexander added a commit that referenced this pull request Oct 3, 2025
Includes the following:

- #7374
- #7373
- #7377
- #7380
- #7382
- #7381
- #7364
- #7384
- #7385
- #7388
- #7386
- #7391
- #7242

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Oct 28, 2025
Includes the following:

- #7380
- #7384
- #7385
- #7388
- #7395
- #7400
- #7399
- #7401
- #7402
- #7423
- #7424
- #7411
- #7428
- #7429
- #7431
- #7435
- #7433
- #7443
- #7455
- #7465
- #7466
- #7460
- #7484
- #7479

Signed-off-by: Neil Twigg <neil@nats.io>
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.

2 participants