chore(deps): Update rocksdb-js to 2.6.0 - #2034
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| "@fastify/static": "^9.1.3", | ||
| "@harperfast/extended-iterable": "^1.0.1", | ||
| "@harperfast/rocksdb-js": "^2.5.0", | ||
| "@harperfast/rocksdb-js": "^2.6.0", |
There was a problem hiding this comment.
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>
Update rocksdb-js to 2.6.0.
Release notes: https://github.com/HarperFast/rocksdb-js/releases/tag/v2.6.0