[PR #5016] [MERGED] Promote storage writer safety fix to main #6591

Closed
opened 2026-10-23 04:11:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5016
Author: @SpicyMarinara
Created: 8/14/2026
Status: ✅ Merged
Merged: 8/14/2026
Merged by: @SpicyMarinara

Base: main ← Head: staging


📝 Commits (8)

  • 219331b fix: prevent concurrent storage writers
  • 5896a4f fix: prevent concurrent file storage writers
  • d02cb7f Revert "fix: prevent concurrent file storage writers"
  • ef67f34 fix: add portable storage writer lock
  • f360e55 Merge remote-tracking branch 'origin/main' into hotfix/5013-storage-single-writer
  • 1aca082 fix: harden storage writer lease lifecycle
  • 83c11ea fix: close storage writes before releasing lease
  • a8b104c Merge pull request #5014 from Pasta-Devs/hotfix/5013-storage-single-writer

📊 Changes

6 files changed (+544 additions, -29 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 docs/TROUBLESHOOTING.md (+6 -0)
📝 package.json (+2 -1)
📝 packages/server/src/db/file-backed-store.ts (+313 -27)
📝 packages/server/src/services/mari-db/mari-db.service.ts (+5 -1)
➕ scripts/regressions/storage-writer-lock.regression.ts (+214 -0)

📄 Description

Linked issue

Closes #5013

Why this change

  • Promote the reviewed single-writer storage safeguard from exact staging to main so concurrent Engine processes cannot silently overwrite the same file-native data directory.

What changed

  • Promotes exact staging commit a8b104cba93c1df191c12b7fff15d472bdb2e07d without additional edits.
  • Adds a portable per-data-directory writer lease, safe shutdown write blocking, stale manifest-count healing, Mari DB rebinding, focused regression coverage, troubleshooting guidance, and the docs-i18n follow-up #5015.
  • Keeps Marinara Engine at version 2.4.2. This promotion does not rebuild or replace the v2.4.2 release, installers, tag, or stable Docker images.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Automated validation and review evidence are recorded on #5014; this PR is an exact branch promotion with no extra content.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Not applicable; this is a server storage-safety fix.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5016 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/14/2026 **Status:** ✅ Merged **Merged:** 8/14/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `staging` --- ### 📝 Commits (8) - [`219331b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/219331befb3a4f98236d7433871dddbdf4fc1059) fix: prevent concurrent storage writers - [`5896a4f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5896a4f36b08926a1fcc7719a39fb4c940b9f0cb) fix: prevent concurrent file storage writers - [`d02cb7f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d02cb7fb2fc98f5e18fd8038ef8403e6697e33a4) Revert "fix: prevent concurrent file storage writers" - [`ef67f34`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ef67f34a3ed4ccfaa11b51f644d1b4a273bb2d58) fix: add portable storage writer lock - [`f360e55`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f360e551afe41115940ea188e0579836b08c39ad) Merge remote-tracking branch 'origin/main' into hotfix/5013-storage-single-writer - [`1aca082`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1aca08276a1721ab59d0d2a9096e62f90e4c1024) fix: harden storage writer lease lifecycle - [`83c11ea`](https://github.com/Pasta-Devs/Marinara-Engine/commit/83c11ea31b3059372c03bd0e3f3f920c3e94200a) fix: close storage writes before releasing lease - [`a8b104c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a8b104cba93c1df191c12b7fff15d472bdb2e07d) Merge pull request #5014 from Pasta-Devs/hotfix/5013-storage-single-writer ### 📊 Changes **6 files changed** (+544 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `docs/TROUBLESHOOTING.md` (+6 -0) 📝 `package.json` (+2 -1) 📝 `packages/server/src/db/file-backed-store.ts` (+313 -27) 📝 `packages/server/src/services/mari-db/mari-db.service.ts` (+5 -1) ➕ `scripts/regressions/storage-writer-lock.regression.ts` (+214 -0) </details> ### 📄 Description ## Linked issue Closes #5013 ## Why this change - Promote the reviewed single-writer storage safeguard from exact `staging` to `main` so concurrent Engine processes cannot silently overwrite the same file-native data directory. ## What changed - Promotes exact staging commit `a8b104cba93c1df191c12b7fff15d472bdb2e07d` without additional edits. - Adds a portable per-data-directory writer lease, safe shutdown write blocking, stale manifest-count healing, Mari DB rebinding, focused regression coverage, troubleshooting guidance, and the docs-i18n follow-up #5015. - Keeps Marinara Engine at version 2.4.2. This promotion does not rebuild or replace the v2.4.2 release, installers, tag, or stable Docker images. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Automated validation and review evidence are recorded on #5014; this PR is an exact branch promotion with no extra content. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Not applicable; this is a server storage-safety fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:11:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6591
No description provided.