Skip to content

fix: persist room data with atomic file replacement - #18

Merged
wjc2821296948 merged 1 commit into
Low-Rate:mainfrom
lijiashu1:fix/atomic-persistence-writes
Oct 20, 2026
Merged

wjc2821296948 merged 1 commit into
Low-Rate:mainfrom
lijiashu1:fix/atomic-persistence-writes

Conversation

@lijiashu1

Copy link
Copy Markdown
Member

Summary

  • Write room/session state to a unique temporary file before replacing the persisted JSON file.
  • Use a same-directory rename so a process interruption during serialization/write does not truncate the last valid database file.
  • Clean up the temporary file if writing or replacement fails, and use restrictive permissions for the temporary data file.

Validation

  • Reviewed the change against the existing synchronous persistence path.
  • Automated tests were not run in this workflow.

@wjc2821296948
wjc2821296948 force-pushed the fix/atomic-persistence-writes branch from fca6e91 to 61e2368 Compare October 20, 2026 09:54
@wjc2821296948 wjc2821296948 self-assigned this Oct 20, 2026
@wjc2821296948
wjc2821296948 requested review from a team and wjc2821296948 October 20, 2026 09:54
@wjc2821296948
wjc2821296948 merged commit bd02d5e into Low-Rate:main Oct 20, 2026
1 check passed
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