@quereus/plugin-leveldb 4.22.0 → 4.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,320 +1,321 @@
1
- # @quereus/plugin-leveldb
2
-
3
- > **Stability: Beta** — complete and tested, but the surface is still being shaped; a
4
- > breaking change may land in a minor release. It rides `@quereus/store`'s on-disk key
5
- > encoding, which is not frozen. See [Stability Tiers](../../docs/stability.md#tiers).
6
-
7
- LevelDB storage plugin for Quereus. Provides persistent storage for Node.js environments using the [`@quereus/store`](../quereus-store/) module.
8
-
9
- ## Features
10
-
11
- - **Fast**: LevelDB offers excellent read/write performance for key-value workloads
12
- - **Transaction isolation**: Read-committed + read-your-own-writes by default (no write-write conflict detection; not snapshot isolation)
13
- - **Sorted keys**: Efficient range queries with ordered iteration
14
- - **Crash-safe commits**: A whole transaction's data + secondary-index writes commit in one atomic, durable LevelDB batch (see [Storage layout](#storage-layout))
15
- - **Compression**: Built-in Snappy compression for reduced disk usage
16
-
17
- ## Storage layout
18
-
19
- All of a database's stores live inside **one physical LevelDB** at `basePath`,
20
- each as a [sublevel](https://github.com/Level/abstract-level#sublevel) keyed by
21
- its store name:
22
-
23
- | Logical store | Sublevel name |
24
- |---|---|
25
- | Table data | `{schema}.{table}` |
26
- | Secondary index | `{schema}.{table}_idx_{name}` |
27
- | Unified stats | `__stats__` |
28
- | Catalog (DDL) | `__catalog__` |
29
-
30
- Because every sublevel shares one physical store, a single chained batch commits
31
- across all of a table's sublevels (data + every secondary index) **atomically and
32
- durably** — closing the crash window where a per-store commit loop could leave a
33
- table's rows and its indexes divergent on disk. By default each commit is
34
- `fsync`'d so it survives power loss; see [`syncCommits`](#plugin-settings).
35
-
36
- > **Hard cutover (no on-disk migration).** This shared-root layout is the only
37
- > LevelDB layout. Databases written by the older per-directory layout
38
- > (`{basePath}/{schema}/{table}`, a separate LevelDB per table) are **not** read
39
- > by this version and must be re-created. Pre-1.0 dev data is expected to be
40
- > thrown away; there is no migration importer.
41
-
42
- ## Installation
43
-
44
- ```bash
45
- npm install @quereus/plugin-leveldb @quereus/store @quereus/isolation
46
- ```
47
-
48
- ## Quick Start
49
-
50
- ### With registerPlugin (Recommended)
51
-
52
- ```typescript
53
- import { Database, registerPlugin } from '@quereus/quereus';
54
- import leveldbPlugin from '@quereus/plugin-leveldb/plugin';
55
-
56
- const db = new Database();
57
- await registerPlugin(db, leveldbPlugin, { basePath: './data' });
58
-
59
- await db.exec(`
60
- create table users (id integer primary key, name text)
61
- using store
62
- `);
63
-
64
- // Full transaction isolation enabled by default
65
- await db.exec('BEGIN');
66
- await db.exec(`INSERT INTO users VALUES (1, 'Alice')`);
67
- const user = await db.get('SELECT * FROM users WHERE id = 1'); // Sees uncommitted insert
68
- await db.exec('COMMIT');
69
- ```
70
-
71
- ### Disabling Isolation
72
-
73
- If you need maximum performance and don't require read-your-own-writes within transactions:
74
-
75
- ```typescript
76
- await registerPlugin(db, leveldbPlugin, {
77
- basePath: './data',
78
- isolation: false // Disable isolation layer
79
- });
80
- ```
81
-
82
- ### Direct Usage with Provider
83
-
84
- ```typescript
85
- import { Database } from '@quereus/quereus';
86
- import { createLevelDBProvider } from '@quereus/plugin-leveldb';
87
- import { createIsolatedStoreModule } from '@quereus/store';
88
-
89
- const db = new Database();
90
- const provider = createLevelDBProvider({ basePath: './data' });
91
-
92
- // With isolation (recommended)
93
- const storeModule = createIsolatedStoreModule({ provider });
94
- db.registerModule('store', storeModule);
95
-
96
- await db.exec(`
97
- create table users (id integer primary key, name text)
98
- using store
99
- `);
100
- ```
101
-
102
- ## API
103
-
104
- ### LevelDBStore
105
-
106
- Low-level KVStore implementation. `LevelDBStore.open()` opens a **standalone**
107
- single physical LevelDB database — useful for one-off key-value stores (e.g. sync
108
- metadata). The multi-table StoreModule backend does not use this directly; it
109
- opens one shared root and hands out sublevel-backed stores via `LevelDBProvider`.
110
-
111
- ```typescript
112
- import { LevelDBStore } from '@quereus/plugin-leveldb';
113
-
114
- const store = await LevelDBStore.open({ path: './data/mystore' });
115
-
116
- await store.put(key, value);
117
- const data = await store.get(key);
118
- await store.delete(key);
119
-
120
- // Range iteration
121
- for await (const { key, value } of store.iterate({ gte: startKey, lt: endKey })) {
122
- console.log(key, value);
123
- }
124
-
125
- // Batch writes
126
- const batch = store.batch();
127
- batch.put(key1, value1);
128
- batch.put(key2, value2);
129
- batch.delete(key3);
130
- await batch.write();
131
-
132
- await store.close();
133
- ```
134
-
135
- ### LevelDBProvider
136
-
137
- Factory for managing multiple stores:
138
-
139
- ```typescript
140
- import { createLevelDBProvider } from '@quereus/plugin-leveldb';
141
-
142
- const provider = createLevelDBProvider({ basePath: './data' });
143
-
144
- // All stores are sublevels of the single LevelDB at ./data
145
- const userStore = await provider.getStore('main', 'users'); // sublevel main.users
146
- const catalogStore = await provider.getCatalogStore(); // sublevel __catalog__
147
-
148
- await provider.closeStore('main', 'users'); // drops the sublevel handle
149
- await provider.closeAll(); // closes the shared root
150
- ```
151
-
152
- ## Configuration
153
-
154
- ### Plugin Settings
155
-
156
- | Setting | Type | Default | Description |
157
- |---------|------|---------|-------------|
158
- | `basePath` | string | `'./data'` | Directory of the single shared LevelDB database |
159
- | `createIfMissing` | boolean | `true` | Create the database if it doesn't exist |
160
- | `syncCommits` | boolean | `true` | `fsync` each transaction commit so it survives power loss (slower commits when on) |
161
- | `moduleName` | string | `'store'` | Name to register the virtual table module under |
162
- | `isolation` | boolean | `true` | Wrap with the isolation layer (read-committed + read-your-own-writes; no write-write conflict detection, not snapshot isolation) |
163
-
164
- ### LevelDBStore Options (standalone `open`)
165
-
166
- | Option | Type | Default | Description |
167
- |--------|------|---------|-------------|
168
- | `path` | string | required | Directory path for the database |
169
- | `createIfMissing` | boolean | `true` | Create database if it doesn't exist |
170
-
171
- ## Example with Transactions
172
-
173
- ```typescript
174
- import { Database, registerPlugin } from '@quereus/quereus';
175
- import leveldbPlugin from '@quereus/plugin-leveldb/plugin';
176
-
177
- const db = new Database();
178
- await registerPlugin(db, leveldbPlugin, { basePath: './data' });
179
-
180
- await db.exec(`create table accounts (id integer primary key, balance real) using store`);
181
-
182
- await db.exec('begin');
183
- try {
184
- await db.exec(`update accounts set balance = balance - 100 where id = 1`);
185
- await db.exec(`update accounts set balance = balance + 100 where id = 2`);
186
- await db.exec('commit');
187
- } catch (e) {
188
- await db.exec('rollback');
189
- throw e;
190
- }
191
- ```
192
-
193
- ## Measured read cost (and why no cost profile is declared)
194
-
195
- A storage backend can tell the query planner what its basic reads cost, relative to
196
- reading one row sequentially during a full scan (1.0 by definition). The two knobs live in
197
- [`@quereus/store`'s `cost-profile.ts`](../quereus-store/src/common/cost-profile.ts):
198
- `pointRead` (resolving one secondary-index entry to its row, batched) and `seekPositioning`
199
- (the per-key cost of a multi-key seek). IndexedDB declares measured values; **LevelDB
200
- declares nothing and takes the framework's parity defaults (`pointRead: 1.0`,
201
- `seekPositioning: 0.5`).** That was previously an assumption. It has now been measured, and
202
- this section is the record so nobody has to re-ask.
203
-
204
- ### The numbers
205
-
206
- Measured 2026-08-19 by `packages/quereus/bench/suites/store.bench.mjs`
207
- (`leveldb-read-cost-20k`, `leveldb-read-cost-200k`) on an AMD Ryzen AI 9 HX 370 (24 cores,
208
- 31 GB, NVMe) running Windows 11 Pro 26200 under node v24.2.0. Values are 200 bytes, keys
209
- are `encodeCompositeKey` integers, and the arms drive the `KVStore` directly — no
210
- `Database`, no planner, no isolation overlay.
211
-
212
- | dataset | arm | per operation | ratio vs sequential |
213
- | --- | --- | --- | --- |
214
- | 20 000 rows (~4 MB) | sequential `iterate()`, every value | 0.002514 ms/row | 1.00 (the denominator) |
215
- | | 1 000 random keys via `getMany`, paged at `ROW_RESOLUTION_BATCH` | 0.003156 ms/row | **1.26** |
216
- | | 1 000 random single-key `iterate({gte, lt, limit: 1})` | 0.047205 ms/key | **18.78** |
217
- | 200 000 rows (~40 MB) | sequential `iterate()`, every value | 0.004442 ms/row | 1.00 |
218
- | | 1 000 random keys via `getMany`, paged | 0.006399 ms/row | **1.44** |
219
- | | 1 000 random single-key `iterate({gte, lt, limit: 1})` | 0.069098 ms/key | **15.55** |
220
-
221
- Medians of 13 rounds (20k) and 7 rounds (200k), first round discarded. The 20k row's own
222
- harness median carried a 28.5% spread and was marked `unstable`, so treat its per-arm
223
- figures as the noisier pair; the 200k row's spread was 5.0%.
224
-
225
- ### These ratios do not repeat to the decimal — quote the band, not the digits
226
-
227
- Re-run 2026-08-21 on the same machine, same commit, same benchmark:
228
-
229
- | dataset | `pointRead` | `seekPositioning` |
230
- | --- | --- | --- |
231
- | 20 000 rows | 1.49 (was 1.26) | 14.91 (was 18.78) |
232
- | 200 000 rows | 1.57 (was 1.44) | 15.25 (was 15.55) |
233
-
234
- Only the 200k seek figure held; the other three moved by 10-26%. That is what an
235
- uninstrumented wall-clock ratio on a real filesystem is worth, and it is why these rows are
236
- `informational` and gate nothing.
237
-
238
- **So the durable claims are bands, not decimals:** `pointRead` sits somewhere around
239
- 1.3-1.6 at the key-value layer, and one windowed seek key costs roughly 15 sequential rows
240
- — an order of magnitude above a batched one. Everything below is reasoned from those bands.
241
- A future decision that needs a specific number must re-measure across several runs; reading
242
- a digit out of the table above is not a measurement.
243
-
244
- Re-run with:
245
-
246
- ```bash
247
- QUEREUS_BENCH_LEVELDB=1 node packages/quereus/bench/run.mjs --filter store/leveldb-read-cost
248
- ```
249
-
250
- ### What the two sizes actually separate
251
-
252
- **Not** page-cache-cold versus page-cache-warm. There is no portable way to drop the OS
253
- page cache from Node, and a dataset big enough to exceed a modern machine's page cache
254
- cannot be seeded inside a benchmark's time budget. What the sizes separate is
255
- `classic-level`'s own **8 MB block cache**, which this provider does not override: 20 000
256
- rows fit inside it and are served in-process; 200 000 rows do not, so their random reads go
257
- out to the filesystem — which on a warm machine usually means the OS page cache, not the
258
- physical disk. A claim of "cold" that is really "block-cache-miss, page-cache-hit" would be
259
- worse than no claim, so it is not made.
260
-
261
- ### What the numbers mean, and why nothing is declared
262
-
263
- **`pointRead` is near parity and stays undeclared.** Around 1.3-1.6 against a default of
264
- 1.0. That gap is also an *over*-statement of the truth: the planner's 1.0 unit is a scanned
265
- row *including engine work*, while these arms measured the key-value layer alone. Engine
266
- overhead lands on both sides of the ratio and therefore compresses it toward 1.0, so the
267
- engine-inclusive value sits strictly between 1.0 and whatever the key-value ratio happens
268
- to measure — an interval never measured directly, whose bottom is the current default and
269
- whose top moves run to run. Declaring the top of it would be picking the pessimistic end of
270
- a band on no evidence, so the parity default stands.
271
-
272
- **`seekPositioning` is far from parity, and cannot be fixed by declaring a number.** Around
273
- 15 against a default of 0.5 — a factor of roughly 30. The cause is visible in the raw
274
- milliseconds: a batched read costs ~3.2 µs per key while a single-key `iterate` costs
275
- ~36-47 µs, so the large majority is fixed per-iterator setup and teardown (snapshot, native
276
- iterator, close) that `getMany` amortizes over a whole page and a one-key window cannot.
277
-
278
- That the cost is dominated by fixed setup is also why the seek arm is a fair proxy for the
279
- secondary-index path even though the benchmark runs it against the **data** store's
280
- 200-byte values rather than an index store's smaller entries: what is being priced is
281
- opening and closing an iterator, and the payload the window returns is a few microseconds
282
- of it either way.
283
-
284
- The obstacle is that **one knob prices two arms whose runtime shapes differ by an order of
285
- magnitude on this backend**:
286
-
287
- | arm in `store-module-access-plan.ts` | what it runs (`store-table-scan.ts`) | measured per-key cost |
288
- | --- | --- | --- |
289
- | secondary-index multi-seek (`tryIndexAccessPlan`) | one `iterate()` window per distinct tuple prefix over the index store, **plus** the batched row resolution those entries feed (`resolveIndexEntries`, which pages across windows) | ~15 and up (the single-seek arm, which prices the window only) |
290
- | primary-key multi-seek (`primaryKeyMultiSeekPlan`) | `scanMultiSeekPrimary` → `readEffectiveRowsByKeys`, one round trip per `ROW_RESOLUTION_BATCH` keys, no per-key iterator at all | ~1.3–1.6 (the batched arm) |
291
-
292
- The secondary arm's true per-key cost is therefore the single-seek figure *plus* a batched
293
- read, so the gap below is if anything understated — which only strengthens the conclusion.
294
-
295
- Both charge `seekKeyCount × seekPositioning`. Declaring ~15 would over-charge the
296
- primary-key arm by roughly ten-fold, and that arm's cost is exactly what `rule-key-set-seek`
297
- reads at 2 and 1 000 keys (`probeModuleCosts` → `interpolateBreakEven`) to interpolate a
298
- seek-versus-scan break-even — so the break-even for `where pk in (…)`, a shape that runs
299
- today, would move about ten-fold in the wrong direction. Declaring 0.5 leaves the secondary
300
- arm 30-odd× too cheap, which is where it already is and where no misplan has yet been
301
- observed. A compromise between them (the geometric middle is ~4.5) makes *both* arms about
302
- 3.5× wrong and would need `yarn test:store` to validate, since `seekPositioning` moves plan
303
- selection on exactly that backend. Trading a known status quo for a new, unvalidated
304
- wrongness on a live query shape is not worth doing for a measurement that cannot be acted on
305
- until the knob splits.
306
-
307
- Splitting the knob so each arm can be priced honestly is
308
- `backlog/debt-store-seek-positioning-conflates-two-arms`; the decision about what LevelDB
309
- should ultimately declare is `backlog/debt-leveldb-cost-profile-measurement`, which stays
310
- open on purpose.
311
-
312
- ## Related Packages
313
-
314
- - [`@quereus/store`](../quereus-store/) - Core storage module (StoreModule, StoreTable)
315
- - [`@quereus/plugin-indexeddb`](../quereus-plugin-indexeddb/) - IndexedDB plugin for browsers
316
-
317
- ## License
318
-
319
- MIT
320
-
1
+ # @quereus/plugin-leveldb
2
+
3
+ > **Stability: Beta** — complete and tested, but the surface is still being shaped; a
4
+ > breaking change may land in a minor release. It rides `@quereus/store`'s on-disk key
5
+ > encoding, which is not frozen. See [Stability Tiers](../../docs/stability.md#tiers).
6
+
7
+ LevelDB storage plugin for Quereus. Provides persistent storage for Node.js environments using the [`@quereus/store`](../quereus-store/) module.
8
+
9
+ ## Features
10
+
11
+ - **Fast**: LevelDB offers excellent read/write performance for key-value workloads
12
+ - **Transaction isolation**: Read-committed + read-your-own-writes by default (no write-write conflict detection; not snapshot isolation)
13
+ - **Sorted keys**: Efficient range queries with ordered iteration
14
+ - **Crash-safe commits**: A whole transaction's data + secondary-index writes commit in one atomic, durable LevelDB batch (see [Storage layout](#storage-layout))
15
+ - **Compression**: Built-in Snappy compression for reduced disk usage
16
+
17
+ ## Storage layout
18
+
19
+ All of a database's stores live inside **one physical LevelDB** at `basePath`,
20
+ each as a [sublevel](https://github.com/Level/abstract-level#sublevel) keyed by
21
+ its store name:
22
+
23
+ | Logical store | Sublevel name |
24
+ |---|---|
25
+ | Table data | `{schema}.{table}` |
26
+ | Secondary index | `{schema}.{table}_idx_{name}` |
27
+ | Unified stats | `__stats__` |
28
+ | Catalog (DDL) | `__catalog__` |
29
+
30
+ Because every sublevel shares one physical store, a single chained batch commits
31
+ across all of a table's sublevels (data + every secondary index) **atomically and
32
+ durably** — closing the crash window where a per-store commit loop could leave a
33
+ table's rows and its indexes divergent on disk. By default each commit is
34
+ `fsync`'d so it survives power loss; see [`syncCommits`](#plugin-settings).
35
+
36
+ > **Hard cutover (no on-disk migration).** This shared-root layout is the only
37
+ > LevelDB layout. Databases written by the older per-directory layout
38
+ > (`{basePath}/{schema}/{table}`, a separate LevelDB per table) are **not** read
39
+ > by this version and must be re-created. Pre-1.0 dev data is expected to be
40
+ > thrown away; there is no migration importer.
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ npm install @quereus/plugin-leveldb @quereus/store @quereus/isolation
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ### With registerPlugin (Recommended)
51
+
52
+ ```typescript
53
+ import { Database, registerPlugin } from '@quereus/quereus';
54
+ import leveldbPlugin from '@quereus/plugin-leveldb/plugin';
55
+
56
+ const db = new Database();
57
+ await registerPlugin(db, leveldbPlugin, { basePath: './data' });
58
+
59
+ await db.exec(`
60
+ create table users (id integer primary key, name text)
61
+ using store
62
+ `);
63
+
64
+ // Full transaction isolation enabled by default
65
+ await db.exec('BEGIN');
66
+ await db.exec(`INSERT INTO users VALUES (1, 'Alice')`);
67
+ const user = await db.get('SELECT * FROM users WHERE id = 1'); // Sees uncommitted insert
68
+ await db.exec('COMMIT');
69
+ ```
70
+
71
+ ### Disabling Isolation
72
+
73
+ If you need maximum performance and don't require read-your-own-writes within transactions:
74
+
75
+ ```typescript
76
+ await registerPlugin(db, leveldbPlugin, {
77
+ basePath: './data',
78
+ isolation: false // Disable isolation layer
79
+ });
80
+ ```
81
+
82
+ ### Direct Usage with Provider
83
+
84
+ ```typescript
85
+ import { Database } from '@quereus/quereus';
86
+ import { createLevelDBProvider } from '@quereus/plugin-leveldb';
87
+ import { createIsolatedStoreModule } from '@quereus/store';
88
+
89
+ const db = new Database();
90
+ const provider = createLevelDBProvider({ basePath: './data' });
91
+
92
+ // With isolation (recommended)
93
+ const storeModule = createIsolatedStoreModule({ provider });
94
+ db.registerModule('store', storeModule);
95
+
96
+ await db.exec(`
97
+ create table users (id integer primary key, name text)
98
+ using store
99
+ `);
100
+ ```
101
+
102
+ ## API
103
+
104
+ ### LevelDBStore
105
+
106
+ Low-level KVStore implementation. `LevelDBStore.open()` opens a **standalone**
107
+ single physical LevelDB database — useful for one-off key-value stores (e.g. sync
108
+ metadata). The multi-table StoreModule backend does not use this directly; it
109
+ opens one shared root and hands out sublevel-backed stores via `LevelDBProvider`.
110
+
111
+ ```typescript
112
+ import { LevelDBStore } from '@quereus/plugin-leveldb';
113
+
114
+ const store = await LevelDBStore.open({ path: './data/mystore' });
115
+
116
+ await store.put(key, value);
117
+ const data = await store.get(key);
118
+ await store.delete(key);
119
+
120
+ // Range iteration
121
+ for await (const { key, value } of store.iterate({ gte: startKey, lt: endKey })) {
122
+ console.log(key, value);
123
+ }
124
+
125
+ // Batch writes
126
+ const batch = store.batch();
127
+ batch.put(key1, value1);
128
+ batch.put(key2, value2);
129
+ batch.delete(key3);
130
+ await batch.write();
131
+
132
+ await store.close();
133
+ ```
134
+
135
+ ### LevelDBProvider
136
+
137
+ Factory for managing multiple stores:
138
+
139
+ ```typescript
140
+ import { createLevelDBProvider } from '@quereus/plugin-leveldb';
141
+
142
+ const provider = createLevelDBProvider({ basePath: './data' });
143
+
144
+ // All stores are sublevels of the single LevelDB at ./data
145
+ const userStore = await provider.getStore('main', 'users'); // sublevel main.users
146
+ const catalogStore = await provider.getCatalogStore(); // sublevel __catalog__
147
+
148
+ await provider.closeStore('main', 'users'); // drops the sublevel handle
149
+ await provider.closeAll(); // closes the shared root
150
+ ```
151
+
152
+ ## Configuration
153
+
154
+ ### Plugin Settings
155
+
156
+ | Setting | Type | Default | Description |
157
+ |---------|------|---------|-------------|
158
+ | `basePath` | string | `'./data'` | Directory of the single shared LevelDB database |
159
+ | `createIfMissing` | boolean | `true` | Create the database if it doesn't exist |
160
+ | `syncCommits` | boolean | `true` | `fsync` each transaction commit so it survives power loss (slower commits when on) |
161
+ | `moduleName` | string | `'store'` | Name to register the virtual table module under |
162
+ | `isolation` | boolean | `true` | Wrap with the isolation layer (read-committed + read-your-own-writes; no write-write conflict detection, not snapshot isolation) |
163
+
164
+ ### LevelDBStore Options (standalone `open`)
165
+
166
+ | Option | Type | Default | Description |
167
+ |--------|------|---------|-------------|
168
+ | `path` | string | required | Directory path for the database |
169
+ | `createIfMissing` | boolean | `true` | Create database if it doesn't exist |
170
+
171
+ ## Example with Transactions
172
+
173
+ ```typescript
174
+ import { Database, registerPlugin } from '@quereus/quereus';
175
+ import leveldbPlugin from '@quereus/plugin-leveldb/plugin';
176
+
177
+ const db = new Database();
178
+ await registerPlugin(db, leveldbPlugin, { basePath: './data' });
179
+
180
+ await db.exec(`create table accounts (id integer primary key, balance real) using store`);
181
+
182
+ await db.exec('begin');
183
+ try {
184
+ await db.exec(`update accounts set balance = balance - 100 where id = 1`);
185
+ await db.exec(`update accounts set balance = balance + 100 where id = 2`);
186
+ await db.exec('commit');
187
+ } catch (e) {
188
+ await db.exec('rollback');
189
+ throw e;
190
+ }
191
+ ```
192
+
193
+ ## Measured read cost (and why no cost ratios are declared)
194
+
195
+ A storage backend can tell the query planner what its basic reads cost, relative to
196
+ reading one row sequentially during a full scan (1.0 by definition). The two knobs live in
197
+ [`@quereus/store`'s `cost-profile.ts`](../quereus-store/src/common/cost-profile.ts):
198
+ `pointRead` (resolving one secondary-index entry to its row, batched) and `seekPositioning`
199
+ (the per-key cost of a multi-key seek). IndexedDB declares measured values; **LevelDB
200
+ declares only the engine's `localDisk` latency category (whose bands come from the tables
201
+ below) and no ratios, so it takes the framework's parity defaults (`pointRead: 1.0`,
202
+ `seekPositioning: 0.5`).** That was previously an assumption. It has now been measured, and
203
+ this section is the record so nobody has to re-ask.
204
+
205
+ ### The numbers
206
+
207
+ Measured 2026-08-19 by `packages/quereus/bench/suites/store.bench.mjs`
208
+ (`leveldb-read-cost-20k`, `leveldb-read-cost-200k`) on an AMD Ryzen AI 9 HX 370 (24 cores,
209
+ 31 GB, NVMe) running Windows 11 Pro 26200 under node v24.2.0. Values are 200 bytes, keys
210
+ are `encodeCompositeKey` integers, and the arms drive the `KVStore` directly — no
211
+ `Database`, no planner, no isolation overlay.
212
+
213
+ | dataset | arm | per operation | ratio vs sequential |
214
+ | --- | --- | --- | --- |
215
+ | 20 000 rows (~4 MB) | sequential `iterate()`, every value | 0.002514 ms/row | 1.00 (the denominator) |
216
+ | | 1 000 random keys via `getMany`, paged at `ROW_RESOLUTION_BATCH` | 0.003156 ms/row | **1.26** |
217
+ | | 1 000 random single-key `iterate({gte, lt, limit: 1})` | 0.047205 ms/key | **18.78** |
218
+ | 200 000 rows (~40 MB) | sequential `iterate()`, every value | 0.004442 ms/row | 1.00 |
219
+ | | 1 000 random keys via `getMany`, paged | 0.006399 ms/row | **1.44** |
220
+ | | 1 000 random single-key `iterate({gte, lt, limit: 1})` | 0.069098 ms/key | **15.55** |
221
+
222
+ Medians of 13 rounds (20k) and 7 rounds (200k), first round discarded. The 20k row's own
223
+ harness median carried a 28.5% spread and was marked `unstable`, so treat its per-arm
224
+ figures as the noisier pair; the 200k row's spread was 5.0%.
225
+
226
+ ### These ratios do not repeat to the decimal — quote the band, not the digits
227
+
228
+ Re-run 2026-08-21 on the same machine, same commit, same benchmark:
229
+
230
+ | dataset | `pointRead` | `seekPositioning` |
231
+ | --- | --- | --- |
232
+ | 20 000 rows | 1.49 (was 1.26) | 14.91 (was 18.78) |
233
+ | 200 000 rows | 1.57 (was 1.44) | 15.25 (was 15.55) |
234
+
235
+ Only the 200k seek figure held; the other three moved by 10-26%. That is what an
236
+ uninstrumented wall-clock ratio on a real filesystem is worth, and it is why these rows are
237
+ `informational` and gate nothing.
238
+
239
+ **So the durable claims are bands, not decimals:** `pointRead` sits somewhere around
240
+ 1.3-1.6 at the key-value layer, and one windowed seek key costs roughly 15 sequential rows
241
+ — an order of magnitude above a batched one. Everything below is reasoned from those bands.
242
+ A future decision that needs a specific number must re-measure across several runs; reading
243
+ a digit out of the table above is not a measurement.
244
+
245
+ Re-run with:
246
+
247
+ ```bash
248
+ QUEREUS_BENCH_LEVELDB=1 node packages/quereus/bench/run.mjs --filter store/leveldb-read-cost
249
+ ```
250
+
251
+ ### What the two sizes actually separate
252
+
253
+ **Not** page-cache-cold versus page-cache-warm. There is no portable way to drop the OS
254
+ page cache from Node, and a dataset big enough to exceed a modern machine's page cache
255
+ cannot be seeded inside a benchmark's time budget. What the sizes separate is
256
+ `classic-level`'s own **8 MB block cache**, which this provider does not override: 20 000
257
+ rows fit inside it and are served in-process; 200 000 rows do not, so their random reads go
258
+ out to the filesystem — which on a warm machine usually means the OS page cache, not the
259
+ physical disk. A claim of "cold" that is really "block-cache-miss, page-cache-hit" would be
260
+ worse than no claim, so it is not made.
261
+
262
+ ### What the numbers mean, and why no ratio is declared
263
+
264
+ **`pointRead` is near parity and stays undeclared.** Around 1.3-1.6 against a default of
265
+ 1.0. That gap is also an *over*-statement of the truth: the planner's 1.0 unit is a scanned
266
+ row *including engine work*, while these arms measured the key-value layer alone. Engine
267
+ overhead lands on both sides of the ratio and therefore compresses it toward 1.0, so the
268
+ engine-inclusive value sits strictly between 1.0 and whatever the key-value ratio happens
269
+ to measure — an interval never measured directly, whose bottom is the current default and
270
+ whose top moves run to run. Declaring the top of it would be picking the pessimistic end of
271
+ a band on no evidence, so the parity default stands.
272
+
273
+ **`seekPositioning` is far from parity, and cannot be fixed by declaring a number.** Around
274
+ 15 against a default of 0.5 — a factor of roughly 30. The cause is visible in the raw
275
+ milliseconds: a batched read costs ~3.2 µs per key while a single-key `iterate` costs
276
+ ~36-47 µs, so the large majority is fixed per-iterator setup and teardown (snapshot, native
277
+ iterator, close) that `getMany` amortizes over a whole page and a one-key window cannot.
278
+
279
+ That the cost is dominated by fixed setup is also why the seek arm is a fair proxy for the
280
+ secondary-index path even though the benchmark runs it against the **data** store's
281
+ 200-byte values rather than an index store's smaller entries: what is being priced is
282
+ opening and closing an iterator, and the payload the window returns is a few microseconds
283
+ of it either way.
284
+
285
+ The obstacle is that **one knob prices two arms whose runtime shapes differ by an order of
286
+ magnitude on this backend**:
287
+
288
+ | arm in `store-module-access-plan.ts` | what it runs (`store-table-scan.ts`) | measured per-key cost |
289
+ | --- | --- | --- |
290
+ | secondary-index multi-seek (`tryIndexAccessPlan`) | one `iterate()` window per distinct tuple prefix over the index store, **plus** the batched row resolution those entries feed (`resolveIndexEntries`, which pages across windows) | ~15 and up (the single-seek arm, which prices the window only) |
291
+ | primary-key multi-seek (`primaryKeyMultiSeekPlan`) | `scanMultiSeekPrimary` → `readEffectiveRowsByKeys`, one round trip per `ROW_RESOLUTION_BATCH` keys, no per-key iterator at all | ~1.3–1.6 (the batched arm) |
292
+
293
+ The secondary arm's true per-key cost is therefore the single-seek figure *plus* a batched
294
+ read, so the gap below is if anything understated — which only strengthens the conclusion.
295
+
296
+ Both charge `seekKeyCount × seekPositioning`. Declaring ~15 would over-charge the
297
+ primary-key arm by roughly ten-fold, and that arm's cost is exactly what `rule-key-set-seek`
298
+ reads at 2 and 1 000 keys (`probeModuleCosts` → `interpolateBreakEven`) to interpolate a
299
+ seek-versus-scan break-even — so the break-even for `where pk in (…)`, a shape that runs
300
+ today, would move about ten-fold in the wrong direction. Declaring 0.5 leaves the secondary
301
+ arm 30-odd× too cheap, which is where it already is and where no misplan has yet been
302
+ observed. A compromise between them (the geometric middle is ~4.5) makes *both* arms about
303
+ 3.5× wrong and would need `yarn test:store` to validate, since `seekPositioning` moves plan
304
+ selection on exactly that backend. Trading a known status quo for a new, unvalidated
305
+ wrongness on a live query shape is not worth doing for a measurement that cannot be acted on
306
+ until the knob splits.
307
+
308
+ Splitting the knob so each arm can be priced honestly is
309
+ `backlog/debt-store-seek-positioning-conflates-two-arms`; the decision about what LevelDB
310
+ should ultimately declare is `backlog/debt-leveldb-cost-profile-measurement`, which stays
311
+ open on purpose.
312
+
313
+ ## Related Packages
314
+
315
+ - [`@quereus/store`](../quereus-store/) - Core storage module (StoreModule, StoreTable)
316
+ - [`@quereus/plugin-indexeddb`](../quereus-plugin-indexeddb/) - IndexedDB plugin for browsers
317
+
318
+ ## License
319
+
320
+ MIT
321
+
@@ -19,7 +19,7 @@
19
19
  * per-directory layout (`{basePath}/{schema}/{table}`) are NOT read here and must
20
20
  * be re-created (pre-1.0 dev data). There is no on-disk migration. See README.
21
21
  */
22
- import type { AtomicBatch, KVStore, KVStoreProvider } from '@quereus/store';
22
+ import type { AtomicBatch, KVCostProfile, KVStore, KVStoreProvider } from '@quereus/store';
23
23
  /**
24
24
  * Options for creating a LevelDB provider.
25
25
  */
@@ -49,6 +49,7 @@ export interface LevelDBProviderOptions {
49
49
  * sublevel per logical store.
50
50
  */
51
51
  export declare class LevelDBProvider implements KVStoreProvider {
52
+ readonly costProfile: KVCostProfile;
52
53
  private basePath;
53
54
  private createIfMissing;
54
55
  private syncCommits;
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA8C5E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,CAAC,EAAE,OA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,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB5G;;;;;;;;;;;;;OAaG;IACH,gBAAgB,IAAI,WAAW,GAAG,SAAS;IAM3C;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAWvB,yDAAyD;YAC3C,OAAO;IAoBrB,sFAAsF;IACtF,OAAO,CAAC,YAAY;YAON,gBAAgB;YA2BhB,iBAAiB;YASjB,gBAAgB;IAU9B,4EAA4E;YAC9D,iBAAiB;CAK/B;AAqDD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEtF"}
@@ -21,7 +21,7 @@
21
21
  */
22
22
  import { ClassicLevel } from 'classic-level';
23
23
  import { buildDataStoreName, buildIndexStoreName, CATALOG_STORE_NAME, STATS_STORE_NAME } from '@quereus/store';
24
- import { QuereusError, StatusCode } from '@quereus/quereus';
24
+ import { COST_PRESETS, QuereusError, StatusCode } from '@quereus/quereus';
25
25
  import { LevelDBStore } from './store.js';
26
26
  const textEncoder = new TextEncoder();
27
27
  /**
@@ -61,12 +61,12 @@ function encodeSublevelName(name) {
61
61
  * LevelDB implementation of KVStoreProvider over a single shared root with one
62
62
  * sublevel per logical store.
63
63
  */
64
- // NOTE: no `costProfile` declared, deliberately — and as of 2026-08-19 that is a MEASURED
65
- // decision, not the absence of one. This provider takes the store framework's parity
66
- // defaults (`pointRead: 1.0`, `seekPositioning: 0.5`). `bench/suites/store.bench.mjs`'s
67
- // `leveldb-read-cost-*` rows measured both knobs at the key-value layer over 200-byte
68
- // values; the full table, machine and caveats are in this package's README
69
- // (§ Measured read cost). In short:
64
+ // NOTE: no cost RATIOS (`pointRead`, `seekPositioning`) in the `costProfile`, deliberately —
65
+ // and as of 2026-08-19 that is a MEASURED decision, not the absence of one. This provider
66
+ // takes the store framework's parity defaults (`pointRead: 1.0`, `seekPositioning: 0.5`).
67
+ // `bench/suites/store.bench.mjs`'s `leveldb-read-cost-*` rows measured both knobs at the
68
+ // key-value layer over 200-byte values; the full table, machine and caveats are in this
69
+ // package's README (§ Measured read cost). In short:
70
70
  //
71
71
  // - `pointRead` came back NEAR the 1.0 default (around 1.3-1.6), and an OVER-statement of
72
72
  // it besides: the planner's 1.0 unit is a scanned row INCLUDING engine work, while these
@@ -95,13 +95,17 @@ function encodeSublevelName(name) {
95
95
  // is priced 30x too cheap. The decision itself stays open as
96
96
  // backlog/debt-leveldb-cost-profile-measurement.
97
97
  //
98
- // NOTE: no `expectedLatencyMs` either (so the module resolves to the 0 default). Unlike the
99
- // cost profile above, this one is UNMEASURED — nothing has ever timed this backend's
100
- // first-row latency — so the declare-only-measured rule applies a fortiori. A guess here
101
- // would be worse than a guessed cost ratio besides: the planner's gates on this field are
102
- // literal 25 ms wall-clock thresholds, and an in-process block-cached backend is nowhere
103
- // near them, so an invented number could only turn machinery on that should stay off.
98
+ // NOTE: the latency half of the `costProfile` is the engine's `localDisk` CATEGORY, not a
99
+ // number measured for this declaration. The category's bands come from this package's own
100
+ // README table (§ Measured read cost: the single-key windowed iterate for the first row, the
101
+ // sequential iterate for each further row), and the decimals still live in that README, not
102
+ // here. What declaring it buys is join selection — at the default `tuning.latencyCostPerMs`
103
+ // a disk-backed row now costs about 5 engine units where a memory row costs 1. It turns no
104
+ // parallel machinery on: `localDisk` sits far below the 25 ms `tuning.parallel.*ThresholdMs`
105
+ // gates. Revisit only with a multi-run measurement of first-row and per-row latency taken
106
+ // for the purpose; then spread the preset and override (`{ ...COST_PRESETS.localDisk, … }`).
104
107
  export class LevelDBProvider {
108
+ costProfile = COST_PRESETS.localDisk;
105
109
  basePath;
106
110
  createIfMissing;
107
111
  syncCommits;
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAGhE,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AC7C,IAAa;QADb,oBAAe,GAAf,eAAe,CAA8B;QAC7C,SAAI,GAAJ,IAAI,CAAS;QAE9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,GAAG,CAAC,KAAc,EAAE,GAAe,EAAE,KAAiB;QACrD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,KAAc,EAAE,GAAe;QACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,KAAK;QACV,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,6DAA6D;YAC7D,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACzB,OAAO;QACR,CAAC;QACD,8EAA8E;QAC9E,+EAA+E;QAC/E,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;CACD;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACpE,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quereus/plugin-leveldb",
3
- "version": "4.22.0",
3
+ "version": "4.24.0",
4
4
  "type": "module",
5
5
  "description": "LevelDB storage plugin for Quereus - Node.js persistent storage",
6
6
  "keywords": [
@@ -37,9 +37,9 @@
37
37
  }
38
38
  },
39
39
  "peerDependencies": {
40
- "@quereus/isolation": "^4.22.0",
41
- "@quereus/quereus": "^4.22.0",
42
- "@quereus/store": "^4.22.0"
40
+ "@quereus/isolation": "^4.24.0",
41
+ "@quereus/quereus": "^4.24.0",
42
+ "@quereus/store": "^4.24.0"
43
43
  },
44
44
  "engines": {
45
45
  "quereus": "^0.24.0"
@@ -96,8 +96,8 @@
96
96
  "test": "cd ../.. && node --import ./packages/quereus-plugin-leveldb/register.mjs node_modules/mocha/bin/mocha.js \"packages/quereus-plugin-leveldb/test/**/*.spec.ts\" --reporter min --colors"
97
97
  },
98
98
  "dependencies": {
99
- "@quereus/quereus": "^4.22.0",
100
- "@quereus/store": "^4.22.0",
99
+ "@quereus/quereus": "^4.24.0",
100
+ "@quereus/store": "^4.24.0",
101
101
  "abstract-level": "^3.1.0",
102
102
  "classic-level": "^3.0.0"
103
103
  },