fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests#22703
Closed
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
Closed
fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests#22703AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
Conversation
Collaborator
Author
|
Automatically closing this stale claudebox draft PR (no updates for 5+ days). Re-open if still needed. |
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.
What
yarn-project/kv-store/src/sqlite-opfs/worker.ts::handleDeleteDbinstalled an OPFS SAH Pool on every teardown, even for:memory:ephemeral DBs (which never back a file). The OPFS SAH Pool acquires an exclusive directory lock, and under heavy test churn + CPU contention (CI runs this container with--cpus=2) the next test's pool install can block indefinitely waiting for the previous terminated worker's OPFS handles to release. ThedeleteDbRPC has no timeout, soafterEachhangs and the wholeyarn testrun times out.All kv-store browser tests use
AztecSQLiteOPFSStore.open(mockLogger, undefined, true)(ephemeral), sohandleInitnever sets up a pool for them — there is literally nothing to unlink. Skip the pool install in that case.Non-ephemeral stores are unchanged:
handleInitstill callsensurePool, sopoolis set by the timehandleDeleteDbruns andpool.unlink(path)still removes the file.Identical to #22693 (same hang hitting
merge-train/spartan); applying directly tomerge-train/fairiesto unblock this train.Failing CI
yarn testkilled bytimeout 600s; last printed test wassqlite-opfs/multi_map.test.ts > multiple keys are independent, then 10 minutes of silence before TERM. Retry showed the same hang.Full analysis: https://gist.github.com/AztecBot/d904db7c7b11fdbc895c99ba44478f22
Verification
yarn test:browser— 131 passed / 2 skipped (~9.7s).yarn test:node— 264 passed.The full
./bootstrap.sh ciwas not run — it takes hours and this fix is scoped to one function, mirroring the previously-verified #22693. Targeted browser-test runs exercise the exact hung code path.ClaudeBox log: https://claudebox.work/s/a3fe40193c79379c?run=1
ClaudeBox log: https://claudebox.work/s/a3fe40193c79379c?run=1