Status¶
Single node, DL/I levels 1 to 5 and of level 6 GSAM, HSAM/SHSAM, Fast Path DEDBs and MSDBs and HALDB (from the manuals), as of 2026-11-30 (phase 0 closed 2026-11-29). Every DL/I rule follows the public manuals, cited at the code that implements it; where the manuals are silent the code says what OliviaDB does. Agreement between OliviaDB's own components is never counted as evidence of DL/I correctness.
What works¶
Engine (open core)¶
- Hierarchical path keys (
spec/path-keys.md): pre-order equals key order; fractional ordinals for non-unique and unkeyed twins. Tests:pathkeyunit tests (random inserts keep order, monotonic appends grow 1 byte per 254). - LSM: write-ahead log (synced per commit), memtable, checksummed tables (format 3:
two-level index, partitions paged through the node cache; format 2 still read) with
Bloom filter partitions and a CLOCK block cache, levelled compaction triggered only by counted sizes
and a round-robin pointer in the manifest, GC watermark, manifest log with rotation,
orphan cleanup (
spec/storage-format.md). Identical input gives identical table bytes (unit test). - MVCC: versions (hybrid logical clock) in the stored key; reads at any version above the watermark.
- Units of work: buffered writes, read-your-own-writes, atomic commit, discard.
- Deterministic simulator (
oliviadb-sim): seeded workloads with write and sync errors, read corruption, crashes with torn and garbled tails, checked after every step against a model of acknowledged commits. 100 seeds in the test suite; a 2000-seed run (6 M operations, 315 k crashes) passes. Mutation checks: disabling the log sync and breaking GC both fail the simulator immediately.
DL/I (open core; Fast Path and HALDB in OliviaDB Enterprise)¶
- Import of DBDGEN and PSBGEN macro source (continuations, lists, quoted values; LCHILD,
XDFLD, SENFLD), and of the records of an IMS catalog database
(
oliviadb_dli::catalog_import: HEADER, DBD, DSET, SEGM, FLD, LCHILD, XDFLD, PSB, PCB, SS, SF as Database Administration, SC19-4214-02, chapter 11 lays them out, turned into DBDGEN/PSBGEN source). Not imported, refused by name: Fast Path, Data Capture, alternative field map and property segments, alternate (TP) PCBs, XDFLD NULLVAL and CONSTANT, fields placed by STARTAFT. The catalog's XML documents (GUR call) are not read: their schemas ship only in the product's sample library. - HIDAM, HISAM, SHISAM (root key order), HDAM (randomizer bucket, anchor point, key);
pluggable randomizers (Rust trait, C callback). OliviaDB ships
OLVHASH1; no vendor module is included, an unregistered module name falls back to it with a note. - Level 1: GU, GN, GNP, GHU, GHN, GHNP, ISRT, REPL, DLET; qualified SSAs with
*/&,+/|,#; fields compared byte by byte (System Utilities, FIELD TYPE=), MSDB fields by type; load mode (PROCOPT=L) with LB/LC/LD. - Level 2: command codes A (clear position, GN and GHN only), C (concatenated key), D
(path retrieval, path insert, path replace), F, G (no randomizing, GN and GHN only), L, N,
O (field name, or position and length as two binary fullwords in the program's byte
order), P (parentage), Q (class letters A-J), U, V,
-; GU takes missing upper levels from the current position; GN past a key bound ends with GE (oliviadb-dli/tests/command_codes.rs). - Level 3: CHKP (basic; symbolic with save areas kept per checkpoint id), XRST, ROLL
(abnormal end U0778 with backout), ROLB, SETS/SETU, ROLS (RA for an unknown token),
SYNC, INIT (STATUS GROUPA/GROUPB, DBQUERY), LOG, DEQ, RLSE (a DB PCB's locks on
unmodified data, its position); CHKP resets positions. INQY through the AIB (DBQUERY,
ENVIRON, ENVIRON2, FIND, LERUNOPT, PROGRAM; null and MSGINFO get AQ: no transaction
manager;
docs/integration.md, "INQY",oliviadb-dli/tests/inqy.rs). STAT (every function, the engine's block cache as the pool) and SNAP (docs/integration.md, "STAT and SNAP",oliviadb-dli/tests/stat.rs). GSCD and GUR are refused with the manuals' codes (no SCD/PST, no IMS catalog database); every status code's coverage:docs/dli-coverage.md. - Level 4: secondary indexes (target root or dependent target with an inverted
secondary data structure, source equal to or below the target, SUBSEQ fields and
/CK, sparse NULLVAL and index maintenance exit routines (EXTRTN=, registered by name;docs/integration.md, "C ABI version 11"), independent AND, maintenance by ISRT/REPL/DLET in the same unit of work), PROCSEQ, the primary index and secondary indexes read as databases; field sensitivity (SENFLD views, REPLACE=NO, qualification limited to sensitive and key fields, blanks for fields outside the view on ISRT). - Level 5, logical relationships: built from the logical relationship chapters of IMS
Version 15 Database Administration ("Insert, delete, and replace rules for logical
relationships") and Application Programming. Tests:
oliviadb-dli/tests/logical.rs,oliviadb-dli/tests/logical_rules.rs. What exists: - Logical children (PARENT=(..,(lparent,PHYSICAL|VIRTUAL,dbd))): data starts with the logical parent's concatenated key; ISRT outside a load needs the logical parent (IX, key feedback = the segment that was to be inserted, the PCB positioned there); parent-to-child entries kept with the child's store.
- Related databases in different stores (
map_database): every rule as in one store, the unit of work committed across the stores (docs/integration.md, "Logical relationships across stores"); the tests run on one store and on two (*_across_stores). - Unidirectional, virtually paired and physically paired relationships (LCHILD PAIR=). Physical pairing: inserting either child stores its pair under the logical parent (II when the pair exists), REPL keeps the intersection data equal on both sides. Virtual pairing: the virtual logical child is seen through logical databases and through the physical PCB of the logical parent's database (the physical parent's concatenated key and the intersection data).
- Insert rules of the destination parent through a concatenated segment: P (must exist, IX), L (inserted from the I/O area when missing, else unchanged), V (inserted or replaced); the key check of a new destination parent.
- Replace rules: P (RX), L (blank status, nothing replaced), V; for the logical child through its logical path its own rule; a changed logical parent key in the child is ignored.
- Delete rules: logical parent P (DX while logical children point to it, logically deleted ones excepted); logical child P with virtual pairing (DX until deleted through the logical path; DLET of the virtual logical child is a logical delete); physically paired children with V on both sides go together; a logical parent with rule V that no relationship needs any more is deleted with them. A logical parent with delete rule L or V that logical children still point to leaves its physical path (its physical dependents go) but stays the destination parent of those children, until the last one is gone or a new segment with its key is inserted; its children are logically deleted. A virtually paired logical child with delete rule L deleted through its physical path stays reachable from its logical parent until it is deleted through that path too. Delete rule L on physically paired children deletes one side only. Delete rule B: a physical parent of virtually paired children is deleted once it is in no relationship any more (not while a child only logically deleted is still under it). Kept from the Database Administration chapters "Delete rules" and "Accessibility of deleted segments".
- Logical databases (ACCESS=LOGICAL): physical segments, concatenated segments (DATA or KEY: KEY leaves the destination parent out of the I/O area), dependents of the destination parent under the concatenated segment; GU, GN, GNP, ISRT, REPL, DLET. Path inserts (command code D) of physical segments; over a concatenated segment AJ (the PCB naming that segment, its level and concatenated key length, the key blank).
- Insert rules FIRST, LAST and HERE for twins without a unique sequence field: HERE in front of the twin the PCB is positioned on (among equal keys for a non-unique sequence field), else in front of all (equal) twins; a load keeps the sequence presented.
- Level 6, Fast Path, DEDB part (OliviaDB Enterprise): DEDB databases (roots placed by a randomizing module; OliviaDB substitutes OLVHASH1 for an unregistered one, so a scan over roots differs in order), variable-length segments, sequential dependents (read newest first under their root; REPL and DLET get AJ), subset pointers (command codes R, S, M, Z, W with pointer numbers; SSPTR= on SEGM and SENSEG; AJ for a pointer the segment does not have or the PCB is not sensitive to; insert with R in front of the subset; a deleted segment's pointers move to the next twin). From the subset pointer chapters of IMS Version 14 Application Programming and Application Programming APIs.
- Level 6, Fast Path, MSDB part (OliviaDB Enterprise): non-terminal-related main storage databases (REL=NO) are
root-only databases in key order, loaded from MSDBINIT records (
System::load_msdbinit; record format from Database Administration, "MSDBINIT record format"). The call rules of Application Programming ("Restrictions on using calls for MSDBs"): GNP AD, two SSAs FT, command codes and Boolean operators AJ; after GE, GB, FT, AD, AK, AC and AJ the PCB has no level, segment name or key feedback (a malformed qualification AJ leaves it as it was, as do DJ, DA and AM); a GN that finds nothing GB, the next GN starts at the first segment again; a REPL releases the segment (a second REPL DJ); PROCOPT G and R only (REPL with G: AM). MSDBs keyed by LTERM names show no segment to a program without a logical terminal (GE, GB). The MSDB commit view: REPL changes take effect at the sync point (also for DEDB PCBs with VIEW=MSDB; ISRT and DLET of a DEDB act at once). An arithmetic overflow found at the sync point gives the CHKP or SYNC call FA and backs the interval out (Messages and Codes, "FA"). MSDBs are kept as OliviaDB's own root-only databases, the form the MSDB-to-DEDB conversion gives them (Database Utilities, "MSDB-to-DEDB Conversion utility"; Application Programming, "DEDBs with MSDB commit view"), with the key order of the MSDB kept for GN. - FLD (MSDB and DEDB): the segment found as by GHU (the PCB shows it, the position is on it, nothing held); field search arguments in order: verify E, G, H, L, M, N against the data as it was before the call; change +, -, = (packed decimal and binary arithmetic) made at the sync point, through every view (a GU in the same interval sees the old data, an overflow shows only there as FA); operand lengths per field type (packed decimal up to its sign, hexadecimal twice the field). A field the segment does not have: FN (no FSA status byte set); verify failed (D), invalid operation (A), length (B), key field (C), invalid data (E): FE with that FSA's status byte, and no change of the call is made; a change through a PCB without replace: AM. From Application Programming APIs ("FLD call") and Application Programming ("Updating segments: REPL, DLET, ISRT, and FLD").
- Level 6, sequential part: HSAM and SHSAM (a load writes the output data set DD2, other
PCBs read the input data set DD1; GU forward and backward, GN, GNP; ISRT outside a load
and REPL get AM, DLET without a get hold DJ) and GSAM (input: GN, GB at the end and then
from the first record, GU with a record search argument, CLSE; output: ISRT appends
fixed-length records, the data set is rewritten when the program first writes). Data
sets are kept in the store; the host maps DD names to data sets or dummies
(
System::set_dd,oliviadb_set_dd). From the GSAM and HSAM sections of IMS Version 15 Application Programming and Database Administration. - Isolation between programs on one system (batch programs sharing a database through the lock manager): positional share locks for reads and positional update locks for get-hold calls (both go when the PCB moves on, even while its next request waits), exclusive locks to the sync point only for updates that change data; a reader waits for an uncommitted change, a GU of an uncommitted root does not wait (GE) but a GN reaching it does; deadlock detection on the wait-for graph, the victim being a waiting program that issued INIT STATUS GROUPB (BC, PCB level 00, key feedback bytes zeroed), else the requester (U0777); the waiter is granted its lock before the victim goes on. PROCOPT=GO reads without locks.
- HALDB (PHIDAM, PHDAM, PSINDEX; OliviaDB Enterprise), built from the public documentation:
partition definitions as DBRC command text (
INIT.DB ... TYPHALDB [HIKEY | PARTSEL()],INIT.PART ... KEYSTRNG()with RANDOMZR/ANCHOR/HIBLOCK/BYTES; IMS Commands Volume 3, "INIT.DB command", "INIT.PART command"), kept in the store's catalog (other partitions later are refused: repartitioning is an unload and reload); selection by high key (padded with X'FF') or by a pluggable partition selection exit (PARTSEL, or PSNAME= on the DBD; Rust trait or C callback, no IBM interface); order PHIDAM by key across partitions with high keys, partition by partition with an exit, PHDAM partition by partition and randomized within; FM for a root key no partition takes; roots loaded in key sequence within a partition only; LF for a logical child in a load; the HALDB control statement (HALDB PCB=(nnn,partition), DFSHALDB) restricts a PCB to one partition (of the PSINDEX with PROCSEQ): GB at the partition's end, FM for another partition's record. Sources: IMS Database Administration ("Creating HALDB databases with the HALDB Partition Definition utility"), R. Lewis, Application Design and Programming with HALDB (IBM Techdocs, 2002). Tests:oliviadb-dli-fp/tests/haldb.rs,oliviadb-dli-ffi/tests/haldb_abi.rs. An ISRT that gets FM leaves the PCB without level, segment name and key feedback. - PCB masks and key feedback exactly as programs see them; EBCDIC (byte for byte) and ASCII runtimes, big- or little-endian binary.
- Entry points: Rust API (
oliviadb_dli::Program::call,call_io), C ABIliboliviadb_dliwithCBLTDLI,CEETDLI,ASMTDLI,PLITDLI,AIBTDLI,oliviadb_dli_call; ABI version 2: host-owned masks,oliviadb_callwith argument lengths, randomizers with context, module name, RMNAME parameters and failure, a DBD/PSB resolver, databases mapped to store paths, unload/reload in a portable format (spec/unload-format.md), DD names and data sets (docs/integration.md; C testtests/c/v2.cdrives every function). - Simulations: seeded DL/I programs over faulty storage (
oliviadb-dli/tests/sim.rs); concurrent programs under program isolation (oliviadb-dli/tests/concurrency.rs, 60 seeds: no lost update, no dirty read, no stall; a weakened lock manager fails it at once).
Replica of IMS databases (phase 1A)¶
- Initial load from an HD Reorganization Unload data set (
System::load_hd_unload). - HISAM and SHISAM data sets and DEDB unloads (
oliviadb_dli_migrate::imsload,oliviadb-migrate load --format hisam|shisam|dedb). HISAM: the primary data set's records and the overflow data set addressed by RBA, read by the logical record format of IMS 13 Database Administration ("How a HISAM record is stored", Figure 25: pointer, segments with segment code and delete byte, segment code 0), the overflow chain followed, segments marked deleted (delete byte bits 0 and 1, "Bits in the delete byte") dropped with their dependents, the all-X'FF' end root skipped; SHISAM: KSDS records are the root segments. Refusals inoliviadb-dli-migrate/tests/imsload.rs. DEDB: the unloaded segment records of the FPB DEDB Unload utility and the FPA Unload function in the DBT format (IMS High Performance Fast Path Utilities User's Guide, SC27-9536-28, "Unloaded segment records layout", Tables 207-213), sorted by their sort key part as the reload's DFSORT step does, sequential dependents kept in entry sequence (stored newest first), subset pointers set from USRPFLG2; tested on hand-built records (oliviadb-dli-migrate/tests/imsload.rs). - Change capture from IMS log records with data capture records (DBDs with
EXIT=(*,KEY,DATA,LOG), set by the source's database administrator): inserts, replaces (old data used to find unkeyed twins), deletes including cascaded ones; units of work end at checkpoints, sync points, program ends and the end of the job; backouts drop work since the last commit point; changes without a commit point stay pending; idempotent by the source time of the last applied unit; a unit backed out by ROLL is not applied. - "As of" reads: each applied unit records its source time against the OliviaDB version;
System::version_at,System::schedule_at(read-only program at a version),System::retain_versions_from. C ABI version 4 has the same functions (docs/integration.md).
Layer 1 for agents (phase 1A)¶
The replica's databases served to agents read-only through the MCP server under agent
PSBs (oliviadb-enterprise/crates/oliviadb-agent, docs/agent-data.md): catalog, navigation by path
(also as of a source time), search (data_recall), watches on changes the capture
applier committed (data_watch; the applier now keeps a change journal per version,
trimmed with the version window). Agent PSBs are PSBGEN source (SENSEG, SENFLD,
PROCOPT=K) with OliviaDB's ROWS (row predicates with user attributes), MASK and PDATA
statements, compiled to the open part's policy model (oliviadb_memory::operational).
Evidence: OliviaDB's own tests (oliviadb-agent/tests/layer1.rs, oliviadb-memory/tests/operational.rs),
including leakage tests: masked values, fields outside the view and records outside the
predicate cannot be read, searched, addressed or watched; derived values follow their
sources.
Semantic catalog (docs/semantic-catalog.md): segments bound to COBOL copybook layouts
through the programs' DL/I calls (I/O area, last SSA, reference modification), types
from PICTURE and USAGE, 88-level meanings as derived fields, REDEFINES discriminators
inferred from IF/EVALUATE conditions and checked against the replica's data, which
programs read and change which segments; served through the agent view (catalog paths,
decoded values, search by meaning). COBOL is parsed by an external parse service
(OLIVIADB_COBOL_PARSER).
SQL projection (phase 1A)¶
The replica's databases as read-only SQL tables over the PostgreSQL wire protocol
(open/crates/oliviadb-sql, docs/sql.md): one table per segment type with the
concatenated key as primary key and the ancestors' keys as foreign key, columns from the
registry's default layout, the semantic catalog or the DBD, each version decoded by its
writer's layout; one view per REDEFINES variant (the recorded variant, else the
discriminator); rights from the agent PSB compiled as for agents (SENSEG, SENFLD, ROWS,
MASK, PDATA); key lookups, scans within the profile's row and time limits, EXPLAIN; reads
as of a version, a source time or a UTC timestamp; SCRAM-SHA-256, TLS; catalogs for psql
and pgJDBC. Served on the standby and on a single node, never on a primary that has a
standby (oliviadb-ha-node --sql, oliviadb-sql-server). Evidence: docs/sql.md,
"Evidence"; psql 16 and pgJDBC 42.7.15 as clients;
rights and refusals; the HA pair across kill -9 of the primary
(oliviadb-ha/tests/e2e_sql.rs).
Phase 1 high availability¶
Primary, warm standby and witness (oliviadb-enterprise/crates/oliviadb-ha, docs/ha.md): semi-
synchronous shipping of the durable class with a retryable timeout and no silent
downgrade, asynchronous session class with reported lag, visibility only of replicated
durable writes, leases and fencing epochs held by a witness, snapshot resynchronisation,
mutual-TLS transport bound to node identities. Engine hooks in oliviadb-core (commit tap,
replicated apply, visible limit). Evidence: the deterministic simulator (seven invariants,
each shown to catch a deliberate bug), a three-process end-to-end test with kill -9,
a partition from the witness and a skewed clock. Agent memory runs on the nodes
(oliviadb_ha::memnode: REMEMBER waits for the standby, recall shows other principals only
replicated records whose keys are replicated, the key store is a replicated class, memory
opens over the replicated trees on promotion; tests e2e_memory.rs and the simulator's
memory runs). Resynchronisation sends the whole version history in chunks (as-of reads
survive it).
Layer-1 cursors (watches, as-of reads) are source times, valid on every copy.
Benchmarks¶
Apple M3 Max (14 cores), 36 GiB, internal SSD, macOS 27.2; cargo bench -p oliviadb-dli --bench
dli; in process (the affine local call, no shared-memory hop), EBCDIC runtime, every call
timed individually; synthetic bank database of 50 000 customers × 3 accounts × 10
transactions = 1.7 M segments (larger than the cache), 64 MiB node cache. Phase 0 rerun on
the same day for comparison.
| call | p50 | p99 | p99.9 | phase 0 p50 / p99 (same day) | design target p50 / p99 |
|---|---|---|---|---|---|
| GN unqualified, whole database | 1.58 µs | 2.42 µs | 9.6 µs | 1.42 / 2.25 µs | 1–2 µs / 10 µs |
| GNP within a record | 1.62 µs | 2.46 µs | 7.3 µs | 1.50 / 2.29 µs | 1–2 µs / 10 µs |
| GU, 3 qualified levels, random record | 4.46 µs | 14.4 µs | 25.2 µs | 2.92 / 18.9 µs | 2–5 µs / 30 µs |
| GU, root key, random record | 1.38 µs | 7.0 µs | 12.1 µs | 1.17 / 13.6 µs | – |
| GU not found (GE) | 2.88 µs | 8.8 µs | 15.2 µs | 2.50 / 15.1 µs | – |
| ISRT, load mode | 1.38 µs | 3.58 µs | 7.7 µs | 1.08 / 1.58 µs | – |
| REPL after GHU | 1.17 µs | 2.00 µs | 6.0 µs | 0.88 / 4.29 µs | – |
All within the design targets; the gate "p99 GU no worse than twice the target" holds
(14.4 µs against 30 µs). Compared with phase 0: p99 and p99.9 are lower (hardware
CRC-32C for block checks, filters kept in the cache at a higher priority), p50 is higher
by 0.1–1.5 µs: each call now locks its database record for program isolation (~10 % of a
random GU), goes through the view layer, and reaches blocks and filters through the
node-wide cache (a mutex and one more lookup per level). Profiling of the random
three-level GU puts ~60 % in the storage read path (block seek and cache) and ~10 % in
locking. These are in-process numbers; the local call path through shared memory adds
about 0.5 µs per call in poll mode (docs/operations.md, "The local call path").
Two-level table indexes (2026-11-30), same day, same machine, before → after (p50 / p99):
GN 1.62 / 2.46 → 1.79 / 2.75 µs; GU 3 levels 4.46 / 14.8 → 4.38 / 13.3 µs; GU root
1.38 / 7.1 → 1.67 / 7.1 µs; GE 2.92 / 9.1 → 3.54 / 9.3 µs; REPL 1.17 / 5.0 → 1.46 / 4.9 µs;
ISRT load 1.38 / 3.4 → 1.29 / 3.2 µs. Point lookups pay one more cache lookup (the index
partition) and a binary search in it, +0.2–0.6 µs at p50; all still within the design
targets. In exchange the resident index of a large table drops ~60-fold
(docs/memory-model.md).
Memory and descriptors for thousands of trees per node: docs/memory-model.md.
Operations (phase 1)¶
open/crates/oliviadb-ops, the oliviadb command (docs/operations.md): oliviadb check (online,
read-only, at a version: table scrub with every block's checksum, path keys and parentage,
orphans, sequence fields, lengths, layout numbers, catalog namespaces, secondary indexes
and logical links both ways, physical pairs; text or JSON, exit code by severity);
oliviadb backup / oliviadb restore (online, consistent at a version, restore at an older
version kept by the stores, verification by the check and JSON export equality);
oliviadb extract / oliviadb load (lossless JSON lines with layout definitions, the load
registering layouts and rebuilding keys and indexes); the write freeze (node-wide after a
failed write or sync or a block that fails its checksum, retryable refusals, oliviadb status,
oliviadb unfreeze); call statistics per program, PCB and function (counts, status codes,
latency percentiles; oliviadb stats); the DL/I server oliviadb serve with what clients get when
it dies (in-flight units of work rolled back with a retryable error, unanswered sync points
resolved by an outcome record written with the commit); on an HA pair a frozen primary
gives up its role (no lease renewals or heartbeats, /readyz 503, fail-stop once the
role is lost) and the standby serves within about the lease (docs/ha.md, simulator
invariant 13, three processes with an injected disk failure). Evidence: injected faults are
found by the check; backups under a concurrent writer match a model of acknowledged
commits; disk faults injected by the simulator; kill -9 of the server under load.
Network API (phase 1, open part; layer 1 enterprise)¶
open/crates/oliviadb-server (docs/network-api.md): agent memory over HTTPS, REST/JSON with
server-sent events for watches, contract spec/oliviadb-api.openapi.json generated from the MCP
tool catalogue; the same tool code, policies and sealed handles as MCP (a shared core,
one session per request); OAuth 2.1 JWTs (token exchange, scopes to profiles) or API keys;
TLS 1.3 only; problem documents with retryable. oliviadb-agent-server adds layer 1 under
agent PSBs with user attributes from the caller's credentials. Evidence: OliviaDB's own tests
over real sockets (oliviadb-server/tests/http.rs, oliviadb-agent-server/tests/layer1_http.rs).
Agent memory (phase 1, open part)¶
open/crates/oliviadb-memory: REMEMBER (idempotent, deduplicated, compare-and-set on the
attribute version, read-your-writes), RECALL under a token budget with level-of-detail
choice, FEEDBACK, CONSOLIDATE, FORGET (decay, retraction, subject erasure by destroying
the subject key; legal hold; export and rectification), durability classes, bitemporal
facts. Evidence: OliviaDB's own tests (oliviadb-memory/tests/memory.rs), measured latency and
the list of what is not built in docs/agent-memory.md. No public benchmark run yet.
Public benchmarks (docs/benchmarks.md), retrieval against labelled evidence, no answer
accuracy claimed: LoCoMo evidence recall at 1000/4000 tokens 0.701/0.866 (hybrid
baseline 0.706/0.864); LongMemEval-S recall_all in full text 0.032/0.298 (hybrid
0.436/0.843), and 0.887/0.906 counting first-sentence summaries. After a mode choice on held-out
data (whole episodes, docs/benchmarks.md): LoCoMo 0.646/0.856, LongMemEval-S (440
held-out) recall_all 0.366/0.750, slightly below the hybrid baseline (0.706/0.864,
0.398/0.832). Agent policies (row
predicates with user attributes, attribute visibility, value masks, masked personal-data
class, applied before ranking; tests oliviadb-memory/tests/policy.rs); navigation through
MCP is filtered and masked by the policy too.
Built-in CPU models (open/crates/oliviadb-models, docs/models.md): embedder (STS-B test
Spearman 82.03, equal to the published 82.03), NER (CoNLL-2003 test F1 90.82 against the
published 91.3), personal-data rules, prompt-injection guard (deepset test: precision
1.000, recall 0.367); latencies measured, above the design's targets for NER and the
guard. MCP server (open/crates/oliviadb-mcp, docs/mcp.md): revision 2026-07-28, validated
against the specification's JSON Schema and examples. Group commit for durable memory
writes. Third-party licences: THIRD_PARTY.md, checked by tools/licenses.py in the
test suite.
What is open¶
- HDAM order of installation randomizers: needs the installation's module registered
(
docs/integration.md, "HDAM and PHDAM root order"; a standalone server loads it witholiviadb serve --randomizer). - Level 5, not built: LCHILD RULES= for virtual children without a unique sequence field; logically deleted physically paired children are not marked; no pairing during a load (IMS resolves it with its prefix resolution utilities); no variable-length segments in logical databases; the path to a logical parent needs unique keys; logical views are materialized one database record at a time; program isolation locks the logical root's database record only.
- HALDB: partition selection exits (OliviaDB: partition ID
order; IMS asks the exit for first and next partitions), PHDAM root order within a
partition without the installation's randomizing module. Not built:
unavailable partitions (BA and the GN that skips to the next available partition),
PSINDEX selected by an exit,
/SXsubsequence fields (an 8-byte ILK in HALDB), HALDB online reorganization (nothing for programs to see). - The rest of level 6: DEDB areas as units (one store per database), POS,
high-speed sequential processing (PROCOPT=H), DEDB secondary indexes; terminal-related
MSDBs and MSDBs with terminal keys hold no data for OliviaDB's programs (no logical
terminals); the reprocessing of FLD verifies at the sync point is not emulated (a
verify no longer true there drops the change instead of reprocessing the transaction);
a BMP that ends with DEDB calls after its last sync point ends abnormally (U1008,
backed out) only when the host says it is a BMP (
Program::set_bmp). - GSAM: record search arguments are OliviaDB record numbers, no symbolic checkpoint repositioning of GSAM data sets, no GSAM on VSAM ESDS.
- A unit of work spanning stores commits atomically on one node (before-images per store, decision in the system store, rollback of interrupted commits when a store opens); across nodes this becomes phase 2's two-phase commit.
- GSAM records: fixed (F, FB), variable (V, VB: the 2-byte length first, AF for a record longer than RECORD=) and undefined length (U: the length in the PCB's undefined-length records area); the data set calls handle variable-length records (RDW).
- Implemented from the manuals without further evidence: POS=M (multiple positioning is treated as single), DLET after a path call (deletes the lowest held segment), ISRT of dependents through a secondary processing sequence (AM), virtual fields (/SX, /CK in SENFLD), SYNC/INIT/LOG/DEQ details, AIB return codes; XRST with an unknown checkpoint id ends the program U0102, SYNC in a batch program gets XD; V1 for a variable-length segment whose size field is over BYTES= or short of the sequence field (ISRT, REPL, DLET), and REPL that lengthens or shortens one. Not decided by the manuals, so refused with an error: a size field below 2 on a segment without a sequence field. Not checked: that a variable-length logical child's size field covers the logical parent's concatenated key (V1 in the manual).
- Isolation is program isolation at database-record granularity, within one process;
waits are cooperative (
Status::WAIT), there is no lock timeout. - A unit of work is buffered in memory until commit (load mode commits every 4096 inserts, as load programs have no backout); SETS keeps a copy of the buffer.
- A torn final log record cannot be told apart from a damaged one (redundant headers as in the design's disk fault model are not built).
- The early flush under the node's memtable budget is a node-local decision; with replication it must become a logged command (ForceFlush in the design).
- Replica: one IMS log source (data capture records); databases without data capture logging would need the physical change records (X'50'), not read; insert positions of unkeyed twins follow the insert rule (HERE taken as LAST); logical relationships are not followed by the applier (each database's changes are applied as logged); a unit of work must stay within one OliviaDB store; fields of the unload and log records OliviaDB does not need are not interpreted. Not read (refused when met): the HISAM Reorganization Unload utility's own output (the manuals give its records as KSDS roots and ESDS dependents with a header and statistics records, but not their layout: load the HISAM data sets or an HD Reorganization Unload instead), HISAM segments in logical relationships (their prefix's pointer and counter area), more than one HISAM data set group, DEDB unloads in the TFMT format, with SDEP=PHYSICAL, compressed segments or insert limit counts.
- Phase-0 gate items that need what this repository cannot provide: PCB parity on a design partner's production traces, share of affine calls and of cross-range units of work on client traces.
- The GnuCOBOL shim of the phase-0 plan: the C ABI is ready, the shim is not written (no GnuCOBOL on the build machine).
Plan (2026-12-01)¶
The first product to sell is one node with a warm standby and a witness (phase 1,
built: docs/ha.md), not a development mode: on it run the IMS replica for agents, the SQL
projection and agent memory. Multi-Raft (phase 2) is its growth, for databases and loads
that do not fit one node. Nothing below is built unless "What works" above says so. Work
in this order:
- Schema foundation. One intermediate representation for
aggregate(the modern DBD) andprofile(the modern PSB), imported from DBDGEN, PSBGEN and agent PSBs, with a round-trip test on a corpus of definitions; a layout registry inside the database (immutable, content-addressed layouts from copybooks, Java classes and the schema language); the writer's layout id in every stored version, outside the segment bytes; typed order-preserving keys (path keys format 2). Drafts:spec/schema.md,spec/path-keys.md.spring-data-oliviadb, built now onoliviadb-dli-mapping, plugs into this later: its entity classes register as layouts, REDEFINES variants are recorded from@When, access paths are checked against profiles. Built (2026-12-01): the layout registry (catalog of the store, or the replicatedClass::Layoutson HA nodes), writer layout ids in version headers (Java mapping, semantic catalog bindings, defaults), decoding by writer layout (JSON export, as-of reads), unload format 2, format-2 keys and the native typed-node API (oliviadb_core::typednodes); the IR and theaggregate/profilelanguage (open crateoliviadb-schema: parser with positions, formatter, canonical JSON and its JSON Schema inspec/schema/), import of DBDGEN, PSBGEN and agent PSBs with the round trip on every definition of the corpus,oliviadb schema plan|applyandoliviadb profile check, profile enforcement in the network API (observe mode on staging, consistency, quota) and in the DL/I call path (oliviadb serve --schema: a program's profile narrows its PSB, so refusals are DL/I's own statuses; observe records on staging), and call scripts on stores defined through the IR (round trip item 4: the same lines). The change stream (CDC) of layer 1 (GET /v1/changes, SSE and file sinks; records decoded by writer layout, masked per consumer, idempotency keys, positions valid on both copies;docs/network-api.md), and of agent memory (GET /v1/changes?path=MEMORY,docs/agent-memory.md, "Change stream"). The native data plane (dev4o,docs/network-api.md"Native aggregates"): aggregates of the schema language served byoliviadb-serverand HA nodes under profiles (get, list, as of, trees; insert, update, delete,/v1/txnas optimistic transactions bounded bytxn scope), layouts of the schema language registered by the first write and decoded by an open codec (oliviadb_schema::codec), their change stream decoded by writer layout, the OpenAPI. Typed clients generated from a profile (dev4q,oliviadb schema client --lang rust|ts,docs/network-api.md"Generated clients"), tested against a live server. Open: Java and Python clients, views and OpenAPI from profiles,profile suggest. Since dev4p the examplespec/schema/examples/bank.olvis served whole: twins by ordinal, references withon deleterules, text in variants, data subjects (crypto-shredding), indexes (synchronous, asynchronous),lookup,search, defaults of new fields, history collected perhistory. The replica measures its lag behind the source (source time against applied time, a feed timeout), sofollower max_lagprofiles are served or refused by it (docs/agent-data.md, "Lag"). - Temporal reasoning in recall. On the LongMemEval-S held-out questions
temporal-reasoning is OliviaDB's weak category: 0.44-0.51 against the hybrid baseline's 0.60
at 4000 tokens (
docs/e2e-eval.md). Hypotheses to test, one at a time: - the context's shape: a date head per item (the session date in a fixed form) and the items in chronological order instead of score order;
- query-time parsing of temporal expressions ("last week", "in March", "two months before X", "first", "most recent") into date ranges and order constraints, used to filter or boost candidates by their session dates;
- date arithmetic hints in the context (the item's age relative to the question's date, the interval between items the question names);
- recall depth for questions that ask for an order or a count over time (more
candidates before the budget cut).
Method: develop only on development questions (LoCoMo conversations 0-2 and the
LongMemEval-S questions outside the held-out 440); measure retrieval (the evidence
sessions in the context) before answer accuracy; no test-set run, and no new
benchmark calls to a hosted model, until the owner asks.
First measurement (2026-12-01,
memory_bench locomo 3withOLIVIADB_CATEGORY=2): on the 90 LoCoMo development temporal questions OliviaDB already puts the evidence turn in the context 0.967 / 0.989 / 0.989 of the time at 1000 / 2000 / 4000 tokens (hybrid 0.950 / 0.978 / 0.989; without the reranker OliviaDB 0.939 / 0.967 / 0.989): no headroom there. The 30 LongMemEval-S questions outside the held-out 440 are all single-session-assistant: the development data holds no LongMemEval temporal-reasoning question, so the gap cannot be worked on without a development set that has it (a synthetic one, or a part of the held-out questions set aside: the owner's decision). Decision: a synthetic development set (docs/benchmarks.md, "Time in questions"). Built (dev4d):Config::temporal(time windows and compared events in questions); on the synthetic set all evidence in the context 0.729 / 0.833 / 0.916 -> 0.892 / 0.931 / 0.975, LoCoMo development unchanged. Next: a judged run on the held-out set when the owner decides. - SQL projection, read-only, PostgreSQL wire protocol, on the standby: tables from
layouts (concatenated key as primary key), rights from the PSB or profile from the first
version, one view per REDEFINES variant with its discriminator,
AS OFreads; indexes only transactional or asynchronous with a freshness mark. Built (dev4e,docs/sql.md): all of the above but the indexes. Open: plans that use secondary indexes, asynchronous indexes with a freshness mark, range scans on keys, UNION, ODBC and BI tools beyond psql and pgJDBC, a live change stream applied next to the server (now applied at startup or by the embedding process). - Operations: an online integrity check (tree order and parentage, secondary indexes,
logical relationships, block checksums, layout ids), one-command online backup and
restore, text extract and load (JSON per aggregate), writes frozen on disk errors,
statistics per program and call; the limits page
docs/limits.mdwith its open items; the design's answer to "what happens when the server process dies". Built (dev4f,docs/operations.md): all of the above, with the DL/I server process (oliviadb serve, TCP) as the place where the server's death is defined and tested. Built later: the local call path through shared memory (oliviadb serve --local, poll and wake modes, the Rust client, the C ABI's client, version 10). Open: the abnormal-end code for a unit of work lost with the server (from the manuals), a log archive for recovery to any point, OpenTelemetry export and lock-wait time in the statistics, the check of sequential and Fast Path data sets. - Getting started: an all-in-one Docker image, a web console to browse trees, a public
demo database (synthetic).
Built (dev4h,
docs/docker.md): the image (multi-stage, non-root, health check, one volume, HTTPS 8443 and SQL 5432, self-signed certificate unless one is mounted, the package list checked), the read-only console at/console(catalog, paths, segments by layout, as of a time, statistics, the check), MCP over HTTP at/mcp, the SQL projection in the same process, the synthetic demo bank (oliviadb demo); tested from outside bytools/docker-test.shwith a real psql. Open: a published image, a browser test of the console. - Optimistic transactions for the native and agent APIs (not DL/I): retried on
conflict, pessimistic after N restarts; a lock timeout.
Built (dev4h,
docs/agent-memory.md"Transactions over agent state"):oliviadb_core::otx::TxDb::transact(serializable, reads and range scans validated at commit, pessimistic after 3 restarts, lock timeout and attempt limit as a retryableError::Busy), agent state transactions (StateStore::transact, thestate_updatetool and route). Open: the DL/I outcome of a lock timeout (from the manuals), the defaults per profile, transactions over memory's facts and episodes. - Protocol facades (a Redis- or DynamoDB-style API for native trees), low priority,
after the first pilots. Designed in
docs/facades.md(dev4r); built: the Redis-protocol facade over native aggregates (resp_listen: RESP2/RESP3, nodes as hashes,GET/SETas JSON,SCANper listing,MULTI/EXECas one transaction,WATCHas a precondition, under the caller's profile; tested withredis-cli) and the/v1/txnoperationsput,unchangedanddelete if_exists. Open: the facade on HA nodes, change notifications over it, the DynamoDB-style facade.
Alongside, for the first pilot: a benchmark harness for "open a customer with cards and the last 100 transactions" on OliviaDB against the customer's current path.
Later phases: multi-Raft (planned step by step in docs/multi-raft.md; steps 2 to 4 built: the
oliviadb-raft crate, one Raft group as a pure state machine with its simulator and
linearizability checker; single-server membership changes, learners, snapshots and log
truncation; the oliviadb-raftlog crate, one log per node for all its groups with one sync
per batch, crash-tested on the simulated file system), two-phase commit across nodes, DR
across regions (not started).