Repository navigation
Enforce the dropTable cross-worker-write reproducer; close #1381, #2496 - #2955
Merged
Merged
Conversation
The reproducer's second test opened with an assert.ok tripwire on columnFamily.pendingReclaims, a stat that only exists in a @harperfast/rocksdb-js build that defers physical column-family drops behind admitted commits (rocksdb-js#850). It started as an unconditional it.skip, became a conditional this.skip(), then a hard assert so an older binding fails loud instead of skipping silently. package.json now pins rocksdb-js 2.10.0 (ships #850), and harper's generation-distinct table stores (66c6108, refs #1381) landed the other half of the fix. The stat always exists at this pin, so the assertion is a permanent no-op; remove it and let the test run unconditionally. Verified 100 consecutive runs (50 before this edit, 50 after) with 0 failures and the cross-worker race caught (raced > 0) on every run. Refs #1381 Refs #2496 Dispatch-Task: harper-enable-droptable-crossworker-reproducer Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqdNKW8ja6cPc238RVJJYZ
The deleted assertion was this file's only reference to the binding dependency; replace it with a comment so the link survives without reintroducing a runtime gate (pre-push nit). Dispatch-Task: harper-enable-droptable-crossworker-reproducer Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqdNKW8ja6cPc238RVJJYZ
Per review: the longer wording over-narrated the existing assertions and quoted the deleted guard's failure message. Dispatch-Task: harper-enable-droptable-crossworker-reproducer Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqdNKW8ja6cPc238RVJJYZ
Contributor
There was a problem hiding this comment.
Code Review
This pull request simplifies the unit test in dropTableCrossWorkerWrite.test.js by removing the unused database import and removing an assertion that checked for columnFamily.pendingReclaims in the database stats. A comment has been added explaining that the test now relies on @harperfast/rocksdb-js to defer physical column-family drops behind admitted commits. There are no review comments, so I have no feedback to provide.
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.
Summary
Confirms the cross-worker write vs RocksDB table-drop race (#1381, #2496 — "Invalid column family specified in write batch" out of
completeInterruptedDrops) is fixed onmain, and turns its reproducer into an unconditional, enforced regression test.unitTests/resources/dropTableCrossWorkerWrite.test.js's second test opened with anassert.oktripwire oncolumnFamily.pendingReclaims, a stat that only exists in a@harperfast/rocksdb-jsbuild that defers physical column-family drops behind admitted commits (rocksdb-js#850). It started as an unconditionalit.skip, became a conditionalthis.skip(), then a hard assert so an older binding fails loud instead of skipping silently.package.jsonnow pins@harperfast/rocksdb-js@2.10.0(ships #850), and harper's generation-distinct table stores (66c61089d, refs #1381) landed the other half of the fix. The stat always exists at this pin, so the assertion was a permanent no-op. This PR removes it so the reproducer runs unconditionally, and adds a one-line comment pointing at rocksdb-js#850 in its place — the deleted assertion was the file's only reference to that dependency.Verification
Built
dist/and ranunitTests/resources/dropTableCrossWorkerWrite.test.jsundernode_modules/.bin/mocha100 consecutive times onmain(50 before this edit, 50 after): 0 failures, and the second test'sraced > 0assertion — confirming the race was actually exercised (a record lock held by the worker's in-flight commit at the momentdropTable()was called) — passed on every run.Close recommendation
Both #1381 and #2496 can close:
dropTable()on the main thread — across 20 iterations per run, 100 runs total, with the record lock sampled as held at drop time on every run and no"Invalid column family"/ unexpected worker events / catalog residue in any of them.mainred after Stop the RocksDB WriteBufferManager from stalling every writer by default #2492 removed the RocksDB write-buffer stall that had been masking this race): the underlying fix (rocksdb-js#850 deferred reclamation + harper's generation-distinct table stores) addresses the race Stop the RocksDB WriteBufferManager from stalling every writer by default #2492 exposed, not Stop the RocksDB WriteBufferManager from stalling every writer by default #2492 itself; no CI sighting of the signature since before the Defer column-family reclamation behind generation-distinct table stores #2604-era work and the 2.10.0 pin landed.For the human reviewer
verdict: LGTM, no open in-scope findings.unitTests/resources/dropTableGeneration.test.js:247has the samecolumnFamily.pendingReclaimsprecondition, now the only remaining deterministic guard on the binding capability now that this PR's reproducer checks it only behaviorally (raced > 0). The adjudicator's read: that's fine as-is — it's anassert.ok, not a skip, and production (resources/Table.ts:422,resources/Table.ts:446,resources/databases.ts:5375) reads the same stat name, so main would already be failing if the name drifted — but whether to reword its "bump the pin" message now that this file no longer carries a matching one is a judgment call left to the reviewer.Framing-Verdict: chosen-approach-sound
🤖 Generated with Claude Code
https://claude.ai/code/session_01BqdNKW8ja6cPc238RVJJYZ
Review-Coverage: authored=claude; ran=gemini,cursor-composer,codex; adjudicated=domain; declined=cursor-grok,cursor-kimi,cursor-muse; rounds=3; full=1 @ f9268f7
Human-Review-Need: 3 (decisions: drop-binding-capability-precondition) @ f9268f7