fix(storage): hold a per-transaction lock so reconcile skips a live OPFS put (05-01)
Reconcile cleaned up any incomplete journal row, including a put still running in another tab, and the put then reported success for deleted files. Put and delete now hold a Web Lock per transaction from begin to return; reconcile takes those locks with ifAvailable, re-reads the page under them and reports the rows it skipped (D-3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
926f448fce
commit
8fc816ee25
@@ -100,6 +100,11 @@ export type OpfsReconciliationReport = Readonly<{
|
||||
| "STAGING_STATE_UNREADABLE";
|
||||
moreTransactionsAvailable: boolean;
|
||||
deadlineReached: boolean;
|
||||
/**
|
||||
* 05-01. Rows whose owner still holds the per-transaction lock. They are
|
||||
* a live put or delete, not debris, and are left for a later reconcile.
|
||||
*/
|
||||
skippedLiveTransactions: number;
|
||||
}>;
|
||||
|
||||
export type OpfsPolicyMaintenanceReport = Readonly<{
|
||||
|
||||
Reference in New Issue
Block a user