Skip to content

[BUG]: CRDT persistUpdate silently loses Yjs updates on IndexedDB read/write failure — missing error handlers#995

Open
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/940-crdt-persistupdate-error-handling
Open

[BUG]: CRDT persistUpdate silently loses Yjs updates on IndexedDB read/write failure — missing error handlers#995
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/940-crdt-persistupdate-error-handling

Conversation

@vipul674

Copy link
Copy Markdown

Description

persistUpdate returned a Promise that never resolved or rejected (fire-and-forget). Missing onerror handlers for getReq, putReq, and the transaction meant IDB failures silently swallowed Yjs updates.

Fix

  • Wrapped entire operation in a proper Promise<void> that resolves on tx.oncomplete
  • Added onerror handlers for getReq, putReq, and tx
  • Compacted storage logic preserved

Changes

  • src/services/crdtSessionEngine.ts: Promise-wrapped persistUpdate with full error handling

Closes #940

persistUpdate was fire-and-forget with no rejection path for IDB
errors. Missing onerror handlers for getReq and tx could silently
lose Yjs updates on IndexedDB read/write failure.

Closes Somil450#940
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@vipul674 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vipul674

Copy link
Copy Markdown
Author

@Somil450 Please review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: CRDT persistUpdate silently loses Yjs updates on IndexedDB read/write failure — missing error handlers for IDBRequest and transaction

1 participant