mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3900] [Issue]: Concurrent connection deletion can restore dangling references #2110
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#2110
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?
Originally created by @Xelvanis on GitHub (Jul 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3900
Summary
Deleting multiple API connections concurrently can cause their dangling-reference cleanup sweeps to overwrite each other, restoring a reference to an already deleted connection. A cleanup failure can also leave deletion and reference cleanup only partially applied.
Expected behavior
Deleting a connection and clearing every reference covered by the existing cleanup sweep should complete atomically. Concurrent connection deletions should preserve each other's cleanup.
Actual behavior
Each deletion currently removes the connection and then performs the cleanup outside a transaction. Concurrent sweeps can read the same original JSON and write different stale whole-object snapshots, allowing the last write to restore the other deleted ID. An error during cleanup can leave a deleted connection with remaining references.
Steps to reproduce
Environment
stagingat5704d8a80Logs, screenshots, or video
No application log is required. An isolated actual file-store reproduction confirmed the stale-write outcome before the fix.
Additional context
Follow-up to merged PR #3866. The bounded fix wraps deletion and the complete reference sweep in the existing file-store transaction, which serializes writers and rolls back in-process failures.
Template check