mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1179] [MERGED] Address profile import asset transaction race #4962
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#4962
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/1179
Author: @cha1latte
Created: 5/24/2026
Status: ✅ Merged
Merged: 5/24/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/pr-1153-atomic-profile-assets📝 Commits (3)
780003fMake profile imports atomic with rollback1929b5eAddress profile import asset transaction raceca84056Merge refactor into profile asset transaction fix📊 Changes
5 files changed (+791 additions, -55 deletions)
View changed files
📝
src-tauri/crates/storage/src/lib.rs(+312 -0)📝
src-tauri/src/commands/storage/profile.rs(+69 -6)📝
src-tauri/src/commands/storage/profile/assets.rs(+370 -36)📝
src-tauri/src/commands/storage/profile/legacy.rs(+21 -8)📝
src-tauri/src/commands/storage/profile/zip_import.rs(+19 -5)📄 Description
What?
This stacks on #1153 and addresses the remaining CodeRabbit blocker before merge. It keeps profile assets staged until the collection replacement transaction reaches its install phase, then publishes the assets through a storage transaction hook.
Why?
#1153 made profile imports rollback-capable, but imported asset directories were still published before
replace_all_manycommitted the collection batch. That left a window where a concurrent import or asset read could observe mixed profile state.How?
FileStorage::replace_all_many_and_thenso profile import can run asset publishing while the collection transaction is still guarded by the storage lock.RestoredProfileAssets::install.Testing?
cargo check --manifest-path src-tauri\Cargo.tomlcargo test --manifest-path src-tauri\Cargo.toml -p marinara-storage replace_all_many -- --nocapturecargo test --manifest-path src-tauri\Cargo.toml -p marinara-engine profile_asset -- --nocapturecargo test --manifest-path src-tauri\Cargo.toml -p marinara-engine profile_import_rolls_back_collections_when_asset_install_fails -- --nocaptureScreenshots
N/A; Rust storage/profile import behavior only.
Anything Else?
This is intended as the mergeable replacement/follow-up path for #1153 because the #1153 head branch lives in
Pasta-Devs, and this workflow does not push directly to upstream.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.