Limits¶
What OliviaDB enforces today, read from the code as of 2026-12-01 (operations utilities: docs/operations.md), and what has no limit yet.
"No limit" means the code does not check one; such a value is bounded only by memory and
disk, and each is listed as open: an explicit limit with an explicit error belongs there.
A value that would silently wrap is refused with an error naming it.
| what | limit today | where | open |
|---|---|---|---|
| Node types per schema (segment types per database) | 254 (Schema::new refuses 255 or more) |
open/crates/oliviadb-core/src/schema.rs |
codes are 0x0100ยท(i+1); the 255 free codes between neighbours are reserved for online additions, not used yet |
| Depth of a tree (levels) | no separate limit; at most the number of types (254); level is a u8 |
schema.rs, open/crates/oliviadb-dli/src/dbd.rs |
the DBD importer does not check IMS's own level limit (to be taken from the DBDGEN manual, not from memory) |
| Key field length per level | 65 535 bytes (key_len: u16); a longer DBD sequence field is refused when the DBD is read, with an error naming the segment and the field |
schema.rs, open/crates/oliviadb-dli/src/dbd.rs (Dbd::parse), store.rs |
|
| Placement bucket length | 255 bytes (u8); HDAM uses 6 |
schema.rs, store.rs (HDAM_BUCKET) |
|
| Ordinal (twins without a unique key) | no limit; grows by one byte per 254 appends at one end | spec/path-keys.md, pathkey.rs |
|
| Path key (HPK) length | native aggregates (format 2): at most 4,096 bytes of encoded key parts per level and 8,192 bytes per path key, refused before anything is written with an error naming the bound (spec/path-keys.md, format 2, "Decisions"); DL/I databases (format 1): no limit (lengths are varints in the log and tables) |
oliviadb-server/src/native/keys.rs (MAX_KEY_PARTS, MAX_PATH_KEY), spec/storage-format.md |
a bound for format-1 path keys |
| Segment / value size | no limit (DBD BYTES= is read as a machine word; values are varint-length) |
dbd.rs, spec/storage-format.md |
an explicit bound; values larger than a block are stored but not measured |
| Unit of work (commit) size | one commit is one write-ahead log record: its payload (8-byte version, op count, and per operation a kind byte and varint-length key and value) is at most 4 294 967 295 bytes (wal::MAX_PAYLOAD, the u32 length field). A larger commit is refused before anything is written (invalid: commit too large ...); the engine is not poisoned and the commit has no effect. Manifest edit batches have the same bound |
open/crates/oliviadb-core/src/wal.rs, manifest.rs, db.rs (commit_at) |
the unit of work is buffered in memory until commit, so memory runs out well before that on most machines; a lower, configurable bound with the same error is open. Recovery need not tell an over-long record from a torn tail: none is ever written |
| Load mode | commits every 4 096 inserts (load programs have no backout) | open/crates/oliviadb-dli/src/program.rs (LOAD_COMMIT_EVERY) |
|
| Reload of an unload | commits every 10 000 records | open/crates/oliviadb-dli/src/unload.rs |
|
| SENSEG PROCOPT | G, I, R, D, A per sensitive segment, overriding the PCB's PROCOPT (ISRT, REPL, DLET of a segment without I, R, D: AM; a path REPL leaves a segment without R that comes back unchanged and gets AM when it changed). Refused when the program is scheduled: K, N or T on a SENSEG, a SENSEG PROCOPT under PCB PROCOPT L or LS, letters other than G, I, R, D, A and P that differ from the PCB's, sensitive segments of one PCB that do not agree on G | open/crates/oliviadb-dli/src/program.rs (segment_options, sopt) |
key sensitivity (K); a GN passing over a segment without G (the manuals do not say); a path REPL through a logical database of a segment without R (refused with an error); which options are "compatible" (the SENSEG statement's words) is not defined on the page. A DLET deletes dependents whatever their own PROCOPT (as the reference runs do) |
| SETS/SETU user data | 4 to 4 096 bytes, else AJ | program.rs (SETS_MAX) |
|
| Databases per store | 65 534 (namespace is a u16; 0 is the catalog, 65 535 is never assigned so the counter cannot wrap); registering one more is refused with an error naming the database |
open/crates/oliviadb-dli/src/system.rs (namespace) |
namespaces of dropped databases are not reused |
| Versions | HLC: 48 bits of milliseconds since 1970 (until about the year 10 889), 16-bit counter that carries into the milliseconds | open/crates/oliviadb-core/src/clock.rs |
|
| LSM levels per tree | 7 (default options) | open/crates/oliviadb-core/src/db.rs |
|
| Trees (LSM) per node | no limit in the code; measured with 4 000 (docs/memory-model.md); open table files capped at 1 024 per node by default |
docs/memory-model.md |
the design's 1-4 thousand ranges per node is a target, not a tested bound |
| Lock wait | no timeout (waits are cooperative, deadlocks are detected) | docs/status.md, "What is open" |
a lock timeout (design: section on transactions) |
| Network API request body | 1 MiB (HTTP 413 above) | open/crates/oliviadb-server/src/lib.rs (MAX_BODY) |
|
Findings listed by oliviadb check |
100 per code and database; the rest counted (suppressed) |
open/crates/oliviadb-dli/src/check.rs (MAX_PER_KIND) |
|
| Backup copy attempts | 100 per store (the owner replaced files being copied each time); then the backup fails naming the store | open/crates/oliviadb-ops/src/backup.rs (COPY_ATTEMPTS) |
|
| Restore at an older version | not below a copy's GC watermark (error naming it); the rebuild holds the store's versions in memory | backup.rs (restore, cut) |
a streaming rebuild; a log archive for recovery to any point |
| Text load | the database is held in memory while it loads (as the unload reload) | open/crates/oliviadb-dli/src/export.rs (load_text), unload.rs |
a streaming load |
| Lock wait of a DL/I server call | 30 s (oliviadb serve --lock-wait), then a retryable refusal |
open/crates/oliviadb-ops/src/server.rs (Config::lock_wait) |
the engine's own lock timeout (plan item 6) |
| Sync-point outcome records | one per client session ever seen (session id and a sequence number), never removed | server.rs (uow_key), program.rs (tag_next_commit) |
removal after a retention period |
| Exit routines named in a DBD | index maintenance (XDFLD EXTRTN=): registered by name (Rust System::register_index_exit, C oliviadb_register_index_exit), else the database is not opened; segment edit/compression (SEGM COMPRTN=): only a routine declared compression-only (declare_compression_only), whose segments are stored as programs see them; Data Capture (EXIT=name): refused, EXIT=* (logging only) accepted; a database naming another is refused when first used, with an error naming the routine |
open/crates/oliviadb-dli/src/system.rs, index.rs |
edit routines that change what programs see (COMPRTN=); synchronous Data Capture exit routines (EXIT=name); what IMS does when an index exit returns a code other than 0 or 4 (the manual gives only those two: OliviaDB fails the call with AO and no effect) |
| IMS catalog import | catalog database records only (oliviadb_dli::catalog_import); one version per DBD record (a second DBD segment is refused); data set groups: every DSET becomes a DATASET statement at the top, segments are not assigned to groups |
open/crates/oliviadb-dli/src/catalog_import.rs |
the GUR call's XML documents (schemas not public); the encoding of XDFLD NULLVAL in the catalog (5 bytes, not given in the chapter: a set value is refused); Fast Path (AREA, LCH2IDX), Data Capture (CAPXDBD, CAPXSEGM), alternative field maps (MAP, CASE, CFLD, MAR, CMAR), properties, vendor segments, alternate PCBs, STARTAFT placement; a command that reads catalog records from an unload |
| Agent memory's recall index in memory | recall_index_mb (default 256 MiB) of caches; entity tables (one entry per entity and alias) and per-tenant statistics outside it |
open/crates/oliviadb-memory/src/diskix.rs, spec memory-index.md |
a tenant whose vectors exceed 60 % of the budget is searched by scanning its sealed vector entries (exact, slow); an approximate on-disk vector index is open |
| Call statistics | one row per (program, PCB, function) in memory until --reset; latency percentiles at most 25 % above the true value |
open/crates/oliviadb-dli/src/stats.rs |
What other systems publish¶
A DBA compares this page with the limit tables of other databases. For the hierarchical key-value store YottaDB, for example, the public documentation lists a key of at most 1 019 bytes with at most 31 subscripts and a value of at most 1 MiB (YottaDB Programmer's Guide and Administration and Operations Guide, docs.yottadb.com). OliviaDB will publish the same set: key, depth, value, unit of work, database size and trees per node, each with the error a caller gets when it is exceeded.