# Storage scaling checkpoint (v1) The file remains two sorted snapshots. Reopen already verifies every record: during that traversal keep up to 64 offsets (512 bytes of offsets, plus vector metadata). A point read or inclusive range seek binary-searches sampled records, then scans forward. No persisted index or stale offset survives reopen. During a commit the old and candidate samples can coexist. Sampling uses an upper bound on the next record count: large delete batches can temporarily leave a coarse index until the next commit/reopen. This is still linear at sufficiently large sizes, not a B+ tree. Database::apply accepts up to 1,024 sorted distinct changes borrowed from the caller. It merges both streams once, then publishes one generation. Empty input does nothing; invalid input does not start a commit. Space exhaustion or adapter failure after starting requires reopen. Single-key operations use the same path. No server-side multi-command transaction. A v2 page tree would require page allocation, root publication, bounded reclaim and migration; untested v2 code is not in the release. Windows GNU release, MemoryStorage, 4-byte keys and 32-byte values. Each row: batch-load keys, reopen, 256 deterministic point reads, then replace 16 spaced records in one commit. Exact byte counts at the adapter boundary, not controller writes. Each update batch used three barriers; the memory adapter's sync has no physical latency. |Records|Mean lookup us|16 updates us|Reopen us|Update bytes|Mean bytes/read|Logical file bytes| |---:|---:|---:|---:|---:|---:|---:| |100|1.21|38|19|4,928|347|9,728| |1,000|3.10|368|157|48,128|699|96,128| |10,000|14.37|4,051|1,554|480,128|4,028|960,128| |100,000|121.79|36,402|15,632|4,800,128|37,012|9,600,128| At 100,000 keys the prior linear scan for the same deterministic queries reads roughly 2.4 MB per lookup on average. Sixteen separate replacements require exactly 16 times the batch's adapter writes and 48 barriers for these equal-size records. Even batched, 512 changed value bytes cost 4.8 MB at that size. Reproduce: cargo run --release -p ratdb-core --example scale. See the overnight report for host filesystem measurements.