Skip to content

chore(deps): Update rocksdb-js to 2.6.0 - #2034

Closed
harperfastbot[bot] wants to merge 2 commits into
mainfrom
update-rocksdb-js
Closed

chore(deps): Update rocksdb-js to 2.6.0#2034
harperfastbot[bot] wants to merge 2 commits into
mainfrom
update-rocksdb-js

Conversation

@harperfastbot

@harperfastbot harperfastbot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Update rocksdb-js to 2.6.0.

Release notes: https://github.com/HarperFast/rocksdb-js/releases/tag/v2.6.0

@socket-security

socket-security Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​harperfast/​rocksdb-js@​2.5.0 ⏵ 2.6.077 +110010099 +1100

View full report

Comment thread package.json
"@fastify/static": "^9.1.3",
"@harperfast/extended-iterable": "^1.0.1",
"@harperfast/rocksdb-js": "^2.5.0",
"@harperfast/rocksdb-js": "^2.6.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High: rocksdb-js 2.6.0 breaks every RocksDB store open — it repurposes the compression option as a RocksDB algorithm, colliding with Harper's LMDB-style compression object

rocksdb-js 2.6.0 (rocksdb-js#735) turns the compression store option into a RocksDB block-compression algorithm ('lz4' or { algorithm, level }) and now validates it. Harper has always passed its LMDB-shaped getDefaultCompression() value ({ startingOffset: 32, threshold }, enabled by default via storage.compression) as the compression option to every RocksDB primary store — see resources/databases.ts (dbiInit.compression = ... at ~L747/L1515) flowing through openRocksDatabase into PrimaryRocksDatabase.open. On 2.5.0 that object was ignored; on 2.6.0 it hits normalizeCompression and throws:

TypeError: compression must be an algorithm name or an { algorithm, level } object
    at normalizeCompression (@harperfast/rocksdb-js/src/store.ts:155)
    at Store.open (store.ts:996)
    at PrimaryRocksDatabase.open (resources/PrimaryRocksDatabase.ts:197)

This PR's CI confirms it: all Unit and Integration suites fail at table open on default config, so the default storage engine is fully broken. Hard merge blocker.

The bump needs a matching Harper change — this dep can't move on its own. Root-cause fix: stop forwarding the LMDB-shaped compression object to RocksDB stores. Either strip compression from the options in openRocksDatabase before constructing PrimaryRocksDatabase (RocksDB uses its own block compression, which 2.6.0 now defaults to LZ4), or gate dbiInit.compression = getDefaultCompression() to the LMDB engine only. If per-table RocksDB compression is actually wanted, translate Harper's config into the new { algorithm, level } shape instead of passing the LMDB object through.


Generated by Barber AI

…B stores

Harper's `storage.compression` (default true) resolves to LMDB's per-value
compression descriptor - `{ startingOffset, threshold, dictionary }` - and that
object was passed straight through to every RocksDB store open. rocksdb-js
ignored it until 2.6.0, which gives `compression` a real meaning (block/blob
algorithm) and validates it, so the bump made every table open throw
"compression must be an algorithm name or an { algorithm, level } object".

Translate at openRocksDatabase, the single point every RocksDB store opens, so
re-opens of existing tables - whose persisted descriptor is LMDB-shaped - are
covered along with new ones. Compression on leaves the option unset and takes
rocksdb-js's own default of lz4 (naming lz4 explicitly would throw on a build
without it); `storage.compression: false` maps to 'none'; an algorithm name or
{ algorithm, level } passes through.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@harperfastbot harperfastbot Bot closed this Jul 31, 2026
@harperfastbot
harperfastbot Bot deleted the update-rocksdb-js branch July 31, 2026 22:25
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.

2 participants