Repository navigation
Fix plain-to-HNSW index changes and main's red unit tests under rocksdb-js 2.14 - #4260
Merged
Merged
Conversation
…le rule rocksdb-js 2.14 refuses a verificationTable opt-in on a column family while a non-participating handle on it is open anywhere in the process. - openIndex: a plain index changed to HNSW on a live table reuses its column family, whose plain handle is still open, so the HNSW store's opt-in threw ERR_VERIFICATION_TABLE_CONFLICT and the declaration failed (permanently: the catalog row is written after the open). On that error, and only for an object-store index, reopen without the record cache and warn; a full restart opts the column family in from its first open again. - sourceApplyConflictRetry.test.js deliberately opens its table's primary with verificationTable: false. In the shared test database that handle outlived the file, and the next file's reload threw on every table; the table now lives in a database the per-file teardown drops. Closes #4222 Dispatch-Task: proposal-kriszyp-harper-4222-rocksdb-2-14-main-red-dd2eff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A thread that only reloads the catalog (it never declares the table) kept its plain index store after another thread changed the attribute to HNSW, so its writes skipped the HNSW graph. The reload now reopens the index when the catalog's custom index type differs from the open store's. Adds a release note for the plain-to-HNSW change and its uncached window. Dispatch-Task: proposal-kriszyp-harper-4222-rocksdb-2-14-main-red-dd2eff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dispatch-Task: proposal-kriszyp-harper-4222-rocksdb-2-14-main-red-dd2eff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dispatch-Task: proposal-kriszyp-harper-4222-rocksdb-2-14-main-red-dd2eff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rocksdb-js also refuses the opt-in briefly after the last non-participating handle closes, while older transactions finish. Dispatch-Task: proposal-kriszyp-harper-4222-rocksdb-2-14-main-red-dd2eff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kriszyp
marked this pull request as ready for review
November 11, 2026 17:43
kriszyp
added a commit
that referenced
this pull request
Nov 11, 2026
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.
⊙ Problem
Since #4211 moved rocksdb-js to 2.14.0, Unit Test has failed on every
maincommit. rocksdb-js 2.14 refuses to open a column family with the verification table (the freshness check behind the record cache) while another handle in the process holds it without one. A test left one open, breaking later files. Changing a plain index to HNSW on a live table hit it too:table()threw, even after a restart.💡 Solution
openIndexreopens an HNSW index without its record cache and warns. Reads stay uncached until restart. Primary stores still throw.⚖️ Alternatives
🤔 Should rocksdb-js accept a late opt-in instead?
If rocksdb-js converted open handles on an opt-in, the uncached fallback could go. That is a native write-path change;
mainneeded to be green first.🤔 Uncached HNSW reads until a restart
Only an index whose type changed while Harper ran is affected (#4257). The cost is not measured.
✅ Verification
resourcesfiles that cascade on CI, in one process: 3 failing onmain, 29 passing here.verificationTableParticipation.test.js: the type change fails onmain; the reload case fails without theinitStoreschange; a fresh HNSW index keeps its cache.mainat 3b9072d:resources-core-o-zpasses in the native and build legs;main's same job fails 59, 58 of them onConflictRetryTable/'s refusal. The remaining reds fail the same tests onmain:componentsandresources-core-a-n(Two branch unit tests fail on rocksdb-js 2.14: a close now reports RocksDB's Close() status, and a live branch directory is copied while it compacts #4252), and Integration1/6 (Bun),6/6 (Bun)and6/6 (uWS HTTP).2/6 (Windows)failsnative-plane-coverage(HNSW write lag), as on four other branches' runs in the same hour.Gates and the 2.13 A/B
node_modules, the tree otherwise unchanged: the cascade and the type change pass there.test:unit:resourcesat this head: 7626 passing, 3 failing on a loaded box (originClosedFloor,recordLockCoordinator,uniqueLocalLogKeys, all timing); their 298 tests pass when the files run alone, and onmain's CI.test:unit:main:components: fails only Two branch unit tests fail on rocksdb-js 2.14: a close now reports RocksDB's Close() status, and a live branch directory is copied while it compacts #4252's test.resourcesrun hit the known intermittent segfault; the file it crashed in passes alone.Docs: release note; no reference page describes the record cache.
Closes #4222
🤖 Generated by Claude Opus 5.5 (Anthropic, Claude Code dev agent); posted via @kriszyp.
Release target: v5.4 — rocksdb-js 2.14 is only on
mainRelated PRs: #4250 overlaps (both edit initStores' catalog loop in resources/databases.ts), 4 others independent
Complexity: complicated
Deferred findings
105c576cb7142ca9major data-integrity —resources/databases.ts— Catalog-only threads write plain entries into the HNSW column family until they reload the catalog — filed A thread that has not reloaded the catalog writes to an index through its old store while another thread rebuilds it #4256aad7c8adb2d04da1minor performance —resources/databases.ts— indexFor never closes the superseded plain wrapper — filed An index changed from plain to HNSW while Harper runs reads without its record cache until restart #42579972708621c19c54nit reliability —resources/databases.ts— Fallback treats rocksdb-js's temporary pending-transaction conflict as permanent and logs a wrong cause — filed An index changed from plain to HNSW while Harper runs reads without its record cache until restart #425713a1cc5543093669nit test-coverage —unitTests/resources/verificationTableParticipation.test.js— The fallback's warning is promised by the release note but not asserted — filed An index changed from plain to HNSW while Harper runs reads without its record cache until restart #425791fa3e288683192bnit correctness —resources/databases.ts— LMDB catalog reload keeps a stale wrapper after a plain/HNSW type change — filed A thread that has not reloaded the catalog writes to an index through its old store while another thread rebuilds it #4256Origin — the dispatch brief this PR was written from
Turn harper main green on rocksdb-js 2.14: open column families consistently with verificationTable
Dispatch: task
proposal-kriszyp-harper-4222-rocksdb-2-14-main-red-dd2eff· queued by unknown · ran by claude/opus/xhigh · worker kzyp-xps-1Review-Coverage: authored=unknown; ran=none; rounds=1 @ 1f1ceaa
Review-Attention: deep ~25m (raised: unmeasured diff) @ 1f1ceaa