Repository navigation
Bump rocksdb-js to 2.8.0 on v5.2 so a commit parked on a never-released write intent stops wedging the worker thread - #2466
Merged
Merged
Conversation
rocksdb-js 2.8.0 bounds the coordinated-retry park with ROCKSDB_JS_PARK_TIMEOUT_MS (rocksdb-js#744), so a commit waiting on a write intent that is never released now wakes and consumes a retry attempt instead of never settling. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
kriszyp
marked this pull request as ready for review
September 2, 2026 11:38
github-actions
Bot
requested review from
Ethan-Arrowood,
cb1kenobi and
heskew
September 2, 2026 11:38
check-shrinkwrap-pins.mjs requires the root msgpackr pin to equal rocksdb-js's own, so one module instance (and one structure/extension registry) is shared; rocksdb-js 2.8.0 depends on msgpackr 2.0.6. The lockfile loses the nested msgpackr copy under rocksdb-js accordingly. 2.0.6 over 2.0.5 is a single decode-hardening change (reject array/map lengths that exceed the remaining source data), and is what main runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
@cb1kenobi I believe you felt like 2.8.0 was probably reasonable to apply to 5.2.x. I know we could do a more targeted 2.7.2, but I believe 2.8.0 has a gotten some decent testing, and seems reasonable to adopt, if you still agree. |
Contributor
|
Reviewed; no blockers found. |
Member
Author
|
I think we need to move ahead with this, Fabric is kind of waiting for this fix. |
This was referenced Sep 2, 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.
rocksdb-js 2.8.0 bounds the coordinated-retry park (rocksdb-js#744): a commit waiting on a write intent whose holder never releases now wakes after
ROCKSDB_JS_PARK_TIMEOUT_MS(5000ms default, unparseable/zero/negative values fall back to it, no way to disable) and consumes a retry attempt exactly as a real release would, instead of never settling. That never-settling park is the root cause of #2450 — the commit that stayed outstanding for 12.5 minutes on three worker threads until the process was restarted.This is a dependency-pin change only; no core code changes. It moves two pins together: rocksdb-js to 2.8.0 and msgpackr to 2.0.6.
build-tools/check-shrinkwrap-pins.mjsrequires the rootmsgpackrpin to equal rocksdb-js's own so the tree carries one msgpackr instance (and so one structure/extension registry), and rocksdb-js 2.8.0 depends on 2.0.6; the docker smoke job caught the mismatch on the first push. The lockfile correspondingly loses the nestedmsgpackrcopy under rocksdb-js. 2.0.6 over 2.0.5 is one decode-hardening commit — reject array and map lengths that exceed the remaining source data — and is the pairingmainalready runs. v5.2 already carries the ladder the woken commit lands in:MAX_RETRIES = 40withabortChainAfterRetries(),abandonWrites()on a retained read handle, and per-attempt outstanding-commit tracking. BecausetrackOutstandingCommit()stamps each attempt at submission, every attempt now settles inside the park timeout, so a stuck intent holder no longer pushes the oldest outstanding commit paststorage.maxTransactionQueueTime(45s) andcheckOverloaded()stops 503-ing every unrelated write on the thread. The thread recovers without a restart, which is the part of #2450 that hurt.For the human reviewer
mainonly. The minimal alternative is cutting rocksdb-js 2.7.2 = 2.7.1 + HTTP Logs showing up in system (non external) logs #744 and pinning that here instead. Either way the decision is a one-line pin and trivially reversible, but it is the decision this PR is asking for — @kriszyp asked for the 2.8.0 route explicitly.TRANSACTION_COMMIT_CONFLICT_TIMEOUT. On 2.7.1 it would be inert for Outstanding-commit wedge recurs on 5.2.6/5.2.7: native commits never settle and checkOverloaded 503s every application write on the thread until restart #2450 (a commit parked forever never reaches a retry decision, so the deadline is never evaluated), and on 2.8.0 it only shortens the tail. Without it, a permanently-held intent ends the initiating request after roughly 40 × 5s ≈ 200s with the existing generic 500 "After 40 coordinated retries, unable to commit transaction" rather than a bounded, typed 503. If the reporter needs the bounded error too, Bound a request-path commit's conflict retries to its queue-time budget #2459 can be backported after it merges onmain— it does not change the wedge outcome.@harperfast/rocksdb-jsandmsgpackrin its ownpackage.json, butbuild-tools/sync-core.shcopies core'sdependencies,devDependencies,overridesandoptionalDependenciesplus core's lockfile into harper-pro wholesale, so both pins arrive there from this PR through the core sync. An earlier hand-written pro PR for the same bump (harper-pro#798) was closed as redundant.v5.2directly rather than arriving as a cherry-pick —mainhas been on 2.8.0 since Fix sourcedFrom cache-fill conflict convergence #2065, which bumped it for the verification-table non-unique flag.Verification
npm run build— clean.npm run test:unit:dataLayer— 242 passing, 0 failing.verifyRocksDbDependencyAlignment()asserts: root pin, rocksdb-js's own pin and the installed version all read2.0.6formsgpackrand1.0.3for@harperfast/extended-iterable, and no nested copy of either remains undernode_modules/@harperfast/rocksdb-js/. The checker itself cannot run locally — it readsnpm-shrinkwrap.packed.json, which only exists inside the packed docker image the smoke job builds.npm run test:unit:resources— 1698 passing, 0 failing, re-run after the msgpackr pin moved (same counts). A first run of the same suite had one failure,Caching > Can load cached indexed data(asserted 3, got 2); the file passes in isolation and the full-suite re-run is green, so it is a pre-existing ordering flake, not a bump regression.npm run test:unit:main— not run locally. The suite stalled on the storage locks shared with two other local Harper suites running concurrently in sibling worktrees (a known local-only contention on this machine, not a product behavior); it was killed rather than reported. CI runs it on this PR.test/fixtures/fork-park-timeout.mts, asserting both a lower and an upper bound on elapsed time so the timeout branch is distinguishable from the not-parked fast path), and the retry ladder the woken commit lands in is already covered on this branch.Refs #2450
Complexity: easy
🤖 Generated with Claude Code
Review-Coverage: authored=unknown; ran=none; rounds=1 @ 6ca418d
Human-Review-Need: 4 @ 6ca418d