mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6085] [MERGED] fix(backup): leave the storage writer lease out of full backups #7055
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7055
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6085
Author: @SonaGat3
Created: 9/12/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/6083-backup-writer-lease📝 Commits (1)
5c1a8b7fix(backup): leave the storage writer lease out of full backups📊 Changes
3 files changed (+30 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
packages/server/src/routes/backup.routes.ts(+8 -1)📝
scripts/regressions/automatic-backup-retention.regression.ts(+20 -0)📄 Description
Linked issue
Closes #6083
Why this change
storage/.writer-lease/owner.json, the per-process writer lease record. It is runtime state, not user data.RESTORE.txtdescribes) carries the stale lease into the new data folder. On another machine the lease reclaim logic has no same-host proof, so startup stops with "Another Marinara Engine process (PID …, host …) may be using …" until the user deletes the directory.storagehas been a backup directory since 1.4.0 and the lease was added under it in August (#5389) without the backup being revisited. Nothing reads the lease from an archive, and the launcher's update snapshot already leaves the directory out for the same reason (#6056).What changed
collectDirectoryZipSourcesskips the top-level.writer-leasedirectory of each backup source directory (onlystoragehas one). One line plus a one-line comment; nothing else about the walk changes.collectBackupDirectorySourcesForRegressionand a case inautomatic-backup-retention.regression.tsproving the top-level lease is left out while a same-named directory deeper in the tree is still collected.[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm check: passed (exit code 0).node scripts/run-regressions.mjs --filter automatic-backup-retention: passed, including the new case.DATA_DIR,TEMP,MARINARA_ENV_FILEpointing to a scratch folder, port 9123): withstorage/.writer-lease/owner.jsonpresent on disk,POST /api/backup/download/start→/status→/fileproduced a backup with 192 entries and nowriter-leaseentry. Before this change the same flow on 2.4.5 included<root>/storage/.writer-lease/owner.json(verified on a real Download Backup while writing the issue).storage/files, so the lease entry was only reaching manual restores.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Not applicable: no UI change.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.