Skip to content

Ensure atomic session persistence in FileStore using write-then-rename pattern#1016

Open
sahvx655-wq wants to merge 1 commit into
apache:mainfrom
sahvx655-wq:filestore-atomic-save
Open

Ensure atomic session persistence in FileStore using write-then-rename pattern#1016
sahvx655-wq wants to merge 1 commit into
apache:mainfrom
sahvx655-wq:filestore-atomic-save

Conversation

@sahvx655-wq
Copy link
Copy Markdown
Contributor

Updated FileStore.save(Session) to use an atomic write-then-rename pattern. Previously, session data was written directly to the final file, which could leave partially written or inconsistent session state if the process was interrupted during persistence. The new logic writes to a temporary .tmp file first and renames it only after a successful write, improving persistence reliability and reducing the risk of corruption.

@sahvx655-wq sahvx655-wq force-pushed the filestore-atomic-save branch from 17af440 to 3a6104d Compare May 29, 2026 07:09
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.

1 participant