picovolt 1.8.0 → 1.9.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 +44 -14
- package/package.json +1 -1
- package/picovolt_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -22,8 +22,9 @@ Virtualization Layer Engine (VLE) that shifts between two on-disk shapes:
|
|
|
22
22
|
- **Production mode:** a single contiguous, memory-mappable `.pvdb` file produced
|
|
23
23
|
by `pv_bake()`.
|
|
24
24
|
|
|
25
|
-
New records use a slotted row layout for O(1) appends.
|
|
26
|
-
|
|
25
|
+
New records use a slotted row layout for O(1) appends. Applications can run
|
|
26
|
+
bounded maintenance steps that transpose immutable non-tail pages into an
|
|
27
|
+
MVCC-preserving columnar layout with packed decimal encoding.
|
|
27
28
|
|
|
28
29
|
## Status
|
|
29
30
|
|
|
@@ -54,6 +55,7 @@ warning-free Clippy builds on Linux and Windows. Shipped changes are tracked in
|
|
|
54
55
|
| [`engine/compliance.rs`](src/engine/compliance.rs) | optional, app-driven usage-policy hook (not a license requirement) |
|
|
55
56
|
| [`enterprise.rs`](src/enterprise.rs) | optional, host-owned audit events and honest capability discovery for fleet integrations |
|
|
56
57
|
| [`db.rs`](src/db.rs) | the `Database` surface that ties it together |
|
|
58
|
+
| [`upgrade.rs`](src/upgrade.rs) | out-of-place format migration with backup and deep verification |
|
|
57
59
|
| [`ffi.rs`](src/ffi.rs) | C ABI (the `capi` feature): a panic-safe, C-callable surface wrapping the engine for Go, Python, and C bindings |
|
|
58
60
|
|
|
59
61
|
### Engineering notes
|
|
@@ -69,13 +71,14 @@ warning-free Clippy builds on Linux and Windows. Shipped changes are tracked in
|
|
|
69
71
|
differential test checks `pv-wasm` against `wasmi` to keep it honest. Floats,
|
|
70
72
|
tables, globals, imports, SIMD, and `br_table` are out of scope for `pv-wasm`
|
|
71
73
|
and are rejected rather than mis-run.
|
|
72
|
-
- **Page-backed engine.** Tables are append-only chains of row pages
|
|
73
|
-
linking to the next. Inserts append to
|
|
74
|
-
plus an O(tables) manifest, so autocommit
|
|
75
|
-
whole-table rewrite. Reads stream through a
|
|
76
|
-
([`storage/cache.rs`](src/storage/cache.rs)), so datasets
|
|
77
|
-
and opt-in ordered indexes
|
|
78
|
-
`WHERE col = value` into a
|
|
74
|
+
- **Page-backed engine.** Tables are append-only chains of hot row pages and
|
|
75
|
+
optional packed cold pages, each header linking to the next. Inserts append to
|
|
76
|
+
a row tail and write only that page plus an O(tables) manifest, so autocommit
|
|
77
|
+
is O(1) per insert rather than a whole-table rewrite. Reads stream through a
|
|
78
|
+
bounded buffer pool ([`storage/cache.rs`](src/storage/cache.rs)), so datasets
|
|
79
|
+
need not fit in RAM, and opt-in ordered indexes
|
|
80
|
+
([`storage/index.rs`](src/storage/index.rs)) turn `WHERE col = value` into a
|
|
81
|
+
point lookup and range comparisons such as
|
|
79
82
|
`WHERE col > v` into an ordered scan rather than a full scan.
|
|
80
83
|
- **Selectable durability.** `Database::set_durability(Durability::Sync)` makes
|
|
81
84
|
each flush `fsync` the data and commit the manifest atomically (write to a temp
|
|
@@ -112,7 +115,8 @@ cargo run --release --example bench # evaluation harness across modes and wor
|
|
|
112
115
|
```
|
|
113
116
|
|
|
114
117
|
Install the full CLI with `cargo install picovolt --features data-tools`, then use `pv query`,
|
|
115
|
-
`pv inspect`, `pv history`, `pv diff`, `pv
|
|
118
|
+
`pv inspect`, `pv history`, `pv diff`, `pv migrate`, `pv compact`, `pv import`,
|
|
119
|
+
`pv export`, and `pv bake`.
|
|
116
120
|
Parquet/SQLite conversion, query explanations, inspection, resumable baking,
|
|
117
121
|
and dataset signing are documented in [Data tools](docs/DATA_TOOLS.md).
|
|
118
122
|
|
|
@@ -152,10 +156,36 @@ around 33k rows/s, linear), larger-than-RAM reads through a bounded buffer pool
|
|
|
152
156
|
667-page dataset serves from a 16-page pool), ordered secondary indexes (point
|
|
153
157
|
lookups roughly 6,100 times faster than a scan, plus range predicates), MVCC
|
|
154
158
|
time-travel, opt-in crash-safe durability (`Durability::Sync`), and a fast
|
|
155
|
-
compile-and-publish path (CAS dedup, columnar compression,
|
|
156
|
-
single-file artifacts). Current limits include full-workspace
|
|
157
|
-
backups rather than an incremental WAL,
|
|
158
|
-
general SQL planner, and no
|
|
159
|
+
compile-and-publish path (CAS dedup, cooperative columnar compression,
|
|
160
|
+
memory-mappable single-file artifacts). Current limits include full-workspace
|
|
161
|
+
transaction backups rather than an incremental WAL, adaptive index access within
|
|
162
|
+
a left-deep equality-join plan rather than a general SQL planner, and no
|
|
163
|
+
concurrent writers.
|
|
164
|
+
|
|
165
|
+
## Maintenance and migration
|
|
166
|
+
|
|
167
|
+
Cold-page maintenance is explicit in 1.x so the host retains ownership of
|
|
168
|
+
scheduling and threads:
|
|
169
|
+
|
|
170
|
+
```sh
|
|
171
|
+
pv compact ./data.pv --max-pages 64
|
|
172
|
+
pv inspect ./data.pv --json
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
`Database::compact_step(max_pages)` preserves record addresses, indexes, and
|
|
176
|
+
complete MVCC history; it never compacts the mutable tail and leaves a page in
|
|
177
|
+
row form when transposition would not save space. Each pass uses the
|
|
178
|
+
crash-recoverable workspace transaction protocol, so allow temporary disk space
|
|
179
|
+
for one complete rollback image. Baked-image migration is
|
|
180
|
+
out-of-place and deeply verified before publication:
|
|
181
|
+
|
|
182
|
+
```sh
|
|
183
|
+
pv migrate old.pvdb new.pvdb --dry-run
|
|
184
|
+
pv migrate old.pvdb new.pvdb --backup old.exact-backup.pvdb
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The source is never modified and existing destinations are never overwritten.
|
|
188
|
+
See [Migration and compaction](docs/MIGRATION.md).
|
|
159
189
|
|
|
160
190
|
## Install and distribution
|
|
161
191
|
|
package/package.json
CHANGED
package/picovolt_bg.wasm
CHANGED
|
Binary file
|