Skip to content

Fix plain-to-HNSW index changes and main's red unit tests under rocksdb-js 2.14 - #4260

Merged
kriszyp merged 6 commits into
mainfrom
fix/rocksdb-2-14-verification-table-opens
Nov 11, 2026
Merged

kriszyp merged 6 commits into
mainfrom
fix/rocksdb-2-14-verification-table-opens

Conversation

@kriszyp

@kriszyp kriszyp commented Nov 11, 2026 •

Copy link
Copy Markdown
Member
Chris chalks fetch fresh, no stash on a rebuilt rack while the old plain key still hangs on its hook, and Kris checks the ledger.

⊙ Problem

Since #4211 moved rocksdb-js to 2.14.0, Unit Test has failed on every main commit. 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

⚖️ Alternatives

  • A separate column family for the HNSW index — changes on-disk naming; an older reader would open the plain index as the graph.
  • Refuse the change until restart — turns a working 2.13 schema change into drop, restart, re-add.
  • Close the old plain handle first — other workers hold their own, and rocksdb-js also refuses while older transactions run.

🤔 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; main needed 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

Gates and the 2.13 A/B

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 main

Related PRs: #4250 overlaps (both edit initStores' catalog loop in resources/databases.ts), 4 others independent
Complexity: complicated

Deferred findings

Origin — 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-1

Review-Coverage: authored=unknown; ran=none; rounds=1 @ 1f1ceaa

Review-Attention: deep ~25m (raised: unmeasured diff) @ 1f1ceaa

kriszyp and others added 5 commits November 11, 2026 05:49
…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
kriszyp marked this pull request as ready for review November 11, 2026 17:43
@kriszyp
kriszyp merged commit b5c731a into main Nov 11, 2026
113 of 130 checks passed
@kriszyp
kriszyp deleted the fix/rocksdb-2-14-verification-table-opens branch November 11, 2026 17:43
kriszyp added a commit that referenced this pull request Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dispatch-Task: harper-precondition-locks-fallback-when-disabled
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.

Make column-family opens consistent with verificationTable so rocksdb-js 2.14 can land

1 participant