fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests#22704
Draft
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
Draft
fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests#22704AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
Conversation
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
Forward-port of PR #22693 from
merge-train/spartantomerge-train/fairies. The kv-store SQLite-wasm-over-OPFS change (#22658) is now in fairies via the latestnext → fairiesmerge, but the fix from #22693 has not yet propagated, so every fairies merge-train CI run is timing out on the kv-store browser tests.yarn-project/kv-store/src/sqlite-opfs/worker.ts::handleDeleteDbinstalls 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; under heavy test churn +--cpus=2CI contention, 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 —handleDeleteDbhas nothing to unlink. Skip the pool install in that case. Non-ephemeral stores are unchanged.Failing CI
yarn testkilled bytimeout 600s(exit 124); 10 minutes of silence after the lastsqlite-opfstest line.Verification
yarn test:browser— 131 passed / 2 skipped (~12.8s).yarn test:nodeblocked locally by missing@aztec/bb.jsartifact (transitive dep, pre-existing env limitation, unrelated to this fix). The failing CI step timed out in the browser half before node tests started.Full analysis: https://gist.github.com/AztecBot/c2e5ab8c838332ed915529db81d3f442
Related
merge-train/spartan.01c0ab1db0 feat!: kv-store on SQLite-wasm over OPFS (#22658)— introduces the affected code.ClaudeBox log: https://claudebox.work/s/8d2f61f686747a33?run=1
ClaudeBox log: https://claudebox.work/s/8d2f61f686747a33?run=1