fix: IDB backing store corruption healing (onyx PR #780 test)#91085
Draft
leshniak wants to merge 5 commits into
Draft
fix: IDB backing store corruption healing (onyx PR #780 test)#91085leshniak wants to merge 5 commits into
leshniak wants to merge 5 commits into
Conversation
Pin onyx to Expensify/react-native-onyx#780 (commit beb75d5f) which adds IDB backing store corruption healing. Remove stale 3.0.71 patch (already reverted upstream in 3.0.72 via PR Expensify#785). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
|
41 tasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Pins
react-native-onyxto PR #780 HEAD (92405996) which adds an IDB backing store corruption healing mechanism. This is a test-only PR to validate the fix in Expensify/App context.What PR #780 does:
UnknownError: Internal error opening backing store(884K errors/month, 26.3% of all storage errors)indexedDB.open(), budgeted to 3 attempts (reset on success)Logger.logAlert/logInfoat every stepdeleteDatabase(), no provider swap, no UI changesAlso removes stale
react-native-onyx+3.0.71.patch— the changes it patched (reverting PR #770) already landed upstream in onyx 3.0.72 via PR #785.Fixed Issues
$ #90636
PROPOSAL:
Tests
Each test injects a monkey-patch via the browser console to simulate the error class, then triggers an Onyx write (e.g. navigate to a different chat). No code changes needed.
Test 1 — Backing store error (Chromium path):
/IDB (heal|InvalidStateError|error|connection closed|Store \w+ does not exist|Creating store)/Log.ts):IDB heal: backing store error detected — dropping cached connection and reopening (2 attempts left)IDB heal: successfully recovered after backing store errorTest 2 — Connection lost (Safari path):
IDB heal: connection lost error detected — dropping cached connection and reopening (2 attempts left)IDB heal: successfully recovered after connection lost errorTest 3 — Budget exhaustion (3 consecutive failures, then gives up):
IDB heal: backing store error detected — dropping cached connection and reopening (2 attempts left)IDB heal: backing store error detected — dropping cached connection and reopening (1 attempts left)IDB heal: backing store error detected — dropping cached connection and reopening (0 attempts left)IDB heal: backing store error — heal budget exhausted, giving upsetWithRetrytakes over (up to 5 retries). App may degrade but should not crash or white-screenScreenshots/Videos
Web - Chrome (Test 1: backing store heal)
TODO: attach recording
Web - Chrome (Test 3: budget exhaustion)
TODO: attach recording
Offline tests
N/A — this change targets IDB connection/corruption errors, not network state. Onyx's existing offline handling is unchanged.
QA Steps
Same as Tests section above.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssection