Skip to content

How we know

fdyno is checked through signed SDK requests, deterministic execution and twelve bounded protocol models. Finite checks do not qualify every production workload.

Method Question Run/details
Conformance and edge sweeps Does it answer like DynamoDB? API behavior
Parity audits Which DynamoDB contract does one API area miss, and why? Audit method
Simulation and model checks Are the checked interleavings safe? Simulation, models
Process/client faults Does a fault lose or duplicate a write? Fault campaigns, EC2 fault-schedule fleet
Soak Does state stay bounded? Observed retention
Recovery Can data return? Drills

Complete commands and protocols live in the test guide.

Conformance suites

Three independent suites run through AWS SDKs against a checkout-built fdyno and private FoundationDB. TLS is opt-in. Excluded cross-account/Scylla-only cases are deselected by exact ID, never counted as passes; each suite uses its own total. Exactly thirteen legacy Alternator restore tests wait for ACTIVE through a bounded test-only adapter. These check capacity shape, not metering, and do not prove every operation option.

Suite Client Selection
ScyllaDB Alternator (AGPL-era subset) plus fdyno cases boto3 Items, queries, indexes, expressions, transactions, streams, TTL, PartiQL, protocol
nubo-db AWS SDK for JavaScript v3 API behavior and validation
ExtendDB portable suite boto3 Wire-protocol cases

fdyno-authored edge sweeps

Seven seeded programs check every response against an in-memory DynamoDB oracle. Unknown behavior is UNKNOWN, not a pass; failures print replay seeds. Multi-process checks cover one snapshot per BatchGetItem/page, synchronous GSIs and atomic transactions.

Sweep Scope
edge Unusual key values and attribute names across every read and write path
edge-expr Update, condition, filter and projection expressions, items at the 48,000-byte limit
edge-lifecycle DDL racing writers on two processes, backfill, TTL, streams, backup, drain
edge-txn Transactions and batches from concurrent clients on three processes
edge-index GSI, LSI and multi-attribute GSI maintenance on every write path
edge-partiql ExecuteStatement, BatchExecuteStatement, ExecuteTransaction
edge-auth SigV4, HTTP framing and size limits

Client matrix

test/sdk/run.sh runs one realistic program per pinned client version, with the client's own paginators, waiters, retry loops, typed errors and models, and checks every result. The Java 1.x, Kotlin, PHP, Ruby, Rust and .NET programs also send marked requests through a fault proxy that injects 500 and ThrottlingException replies, and count each SDK's attempts. It also runs libraries that depend on exact semantics under contention: 20 lock clients race for one lock while one holder is killed, unique constraints and event versions are written at the same time, and encrypted items are tampered with. An endpoint guard fails the run if any call has no explicit endpoint. CONFORMANCE_TLS=1 runs it over TLS. The SDK matrix CI workflow runs it, one job per client language, on every change to the API server and every night. Compatibility lists the clients and results.

Library test suites

test/sdk/run.sh upstream runs each library's own integration tests against fdyno: PynamoDB, ElectroDB and the Java Enhanced Client. It runs them at the commit of the pinned release. A test is changed only where DynamoDB also refuses the request, as an AWS check proved. A test is not run, or is listed as a known difference, only where it expects DynamoDB Local behavior. Each such test has a written reason in test/sdk/upstream/. Compatibility lists the results.

The same client also runs the DynamoDB integration tests of the AWS SDKs for Java, Python, Go, JavaScript and .NET, which AWS runs against DynamoDB itself. Only the endpoint and the credentials change. Each suite sends all other traffic to a guard that refuses it, so no test reaches AWS. Each test that does not pass has a kind and a reason: a feature fdyno does not have, a need for AWS itself, or a documented fdyno limit. Compatibility lists the results.

Streams consumer matrix

test/streams/run.sh runs real stream consumers against one live workload: KCL 1.x with the DynamoDB Streams Kinesis Adapter, a boto3 reader and an aws-sdk-js-v3 reader. Eight writers with separate keys send puts, updates, deletes, batches and transactions for 150 s. In that time the server splits the stream every 30 s, from 2 to 64 shards. For every key, each consumer must deliver the writer's changes exactly once and in order. The KCL worker restarts in the middle of a shard and continues from its checkpoints in a lease table on fdyno. The SDK matrix CI workflow runs it. Compatibility lists the consumers.

Data pipeline connectors

A one-time check on 2026-11-30 (main b6427e472) ran Spark with the EMR DynamoDB connector, Flink's sink and streams source, the Confluent Kafka Connect sink, the Airbyte source and destination, and Glue's Scan and export readers against one fdyno process. The source table has 100,000 items, about 207 MB, with every attribute type, 17-digit decimals and 2–20 KB strings. A proxy logged each request, including what DescribeTable returned to the connector. A parallel Scan then compared the copy with the source item by item. The same copies ran again with the connector's key rate-limited, and the Spark copy and the Airbyte destination also ran against DynamoDB Local. Compatibility gives the results.

SDK retries under fdyno errors

A one-time check on 2026-11-30 recorded fdyno's real replies while we forced each throttle and failure path: the in-flight limit, a paused FoundationDB, same-item contention from two processes, and a commit that did not confirm. A proxy then sent each reply to Go v2, Java v2, boto3 and JS v3 clients with default retry settings: refused once, refused every time, and once after the write had applied. A counter on the item showed how many times each write applied. KCL 1.x read a stream through the same proxy with 5% to 10% of its requests refused. Limits gives the results.

API parity audits

A parity audit takes one API area and checks fdyno against the DynamoDB API reference, the developer guide and the conformance suites above. The audited areas are:

  • transaction limits, batch writes and PartiQL;
  • the Streams API and record contents, and TTL;
  • backup and point-in-time restore;
  • control-plane validation and index lifecycle;
  • import and export, SDK error shapes, and Query and Scan.
When a matrix row finds Next step
A gap that reproduces on FoundationDB Fix it, keep a test or the saved reproduction (Reproduce before changing behavior), and update the page that states the behavior.
A reproduced difference that stays on purpose It goes to the differences list; see Differences kept on purpose.
A case the public AWS text does not settle fdyno keeps its current rule, records a probe or describes the case, and waits for an AWS capture; see Cases that wait for an AWS capture.
  1. Matrix. One row per contract: the AWS wording with its source, the behavior fdyno shows, and the code that produces it. Each row records which item layouts and paths it exercised; some rows rest on reading the source only. A suite test counts as evidence only for what it asserts.
  2. Reproduce before changing behavior. A suspected gap is first reproduced with a signed request or a test against a real FoundationDB cluster. Where a permanent test is practical, the fix keeps one that covers the failure. Otherwise the audit keeps the saved reproduction. The two are not the same evidence. For example, a stream with more than 100 shards returned every shard from DescribeStream with no cursor. A lifecycle test now checks a page of 100 and the continuation from LastEvaluatedShardId.
  3. Concurrency and formats. A change to a durable format, a retry or a fence also runs the checks that apply to it. Not every change needs both:

A passing audit row checks the cases in the matrix, not every option of the operation.

Audit results

Area What the audit checked Result and limits
Query and Scan Seven rows on both item layouts: key conditions, numeric and binary order, index traversal direction, Select modes, GSI consistent-read validation, nested projections, and Limit before filtering. All seven matched the tested expectations; no new gap was found. The audit did not follow page cursors, measure GSI propagation delay, or compare the order of tied index keys.
Stream records View types and images, no-op writes, TTL delete identity, timestamp and size fields, per-item order, records from batch writes and PartiQL, and retention across disable, re-enable, and table deletion. 878a77f1 made both GetRecords encoders round ApproximateCreationDateTime down to whole epoch seconds. Fractional AT_TIMESTAMP seeks still work. Exact DynamoDB SizeBytes accounting and behavior at the retention boundary were not established.

Differences kept on purpose

Difference Why it stays
DeleteTable on a CREATING restore or import target It is how an operator cancels the job; data operations on the target stay blocked.
DeleteTable, or creating or deleting a different GSI, while a GSI is CREATING (one GSI create or delete per request) Each backfill page checks the table ID and index generation in its own transaction, so an old backfill cannot publish into a replacement table. DeleteTable cancels the backfill.
No RequestLimitExceeded fdyno has no account-level request quota to exceed.
No ItemCollectionSizeLimitExceededException fdyno has no 10 GB LSI item-collection limit; FoundationDB capacity is the limit. Other item and transaction limits still apply.

Cases that wait for an AWS capture

When the public AWS text does not settle a case, fdyno keeps its current rule. Changing that rule waits for a capture from a scratch AWS table. Some cases have an exact probe written; others have only a description.

  • What counts toward the 4 MB transaction limit for an Update or a projected Get.
  • How the 10-minute ClientRequestToken window behaves when the service-side commit or completion is delayed. AWS starts the window after the first request completes. fdyno reads its clock before the commit.
  • The wire error for a BatchWriteItem body over the 16 MiB limit.
  • How capacity is split for an LSI Scan that reads base items (a hydrated Scan).
  • The exact error codes, by phase, for the index changes DynamoDB blocks while a GSI is CREATING.

Deterministic simulation

Real handlers, retry loops and fast paths run against a FoundationDB model. Seeds choose requests, conflicts/unknowns/timeouts, callback order and clock jumps; an oracle checks responses/final state, including a late original. Broken controls catch duplicates, missing conflicts and stale metadata. This does not run the C client, networks or disks. Commands and bounds.

What one seed runs

python3 test/sim/run.py runs 1,000 seeds by default, with 48 generated operations per seed. CI runs 100 seeds and the broken controls (ci.yml).

The build tag fdyno_sim swaps the FoundationDB client API for a Go model. The handlers, the retry loop, the fast paths and the same-item queue run from the product source. The runner overlays a small set of named seams at build time (run.py, sim-overlay):

  • seeded entropy instead of crypto/rand;
  • no asynchronous metadata watch;
  • a prior-attempt handoff seam;
  • hooks in export, import, PITR, deleted-stream, regional metadata, table statistics, lease fence, token and TTL code.

Table statistics pages shrink from 10,000 rows to 2. The runner refuses to build when the source text that a hook relies on changed. A normal build has no runtime switch to the model.

  1. Sequential. 48 operations run twice, through the runner path and through the fast path. The two API traces must match. An independent oracle checks the responses and the final items.
  2. Concurrent. Labelled request actors run in a testing/synctest bubble. The controller picks the next modeled I/O callback in seeded order.
  3. Late commit. One case in which an original resolves after a 1021 reply.
  4. Worker scenes. Two Services model two processes, with leases and clock jumps. Then come per-seed scenes for layout, table statistics, TTL, streams, CDC trim, retired streams, PITR (window, jobs), export, and read-version pressure (outage, recovery, stall). Further scenes run behind flags.

The oracle is a separate DynamoDB model, not a second copy of the handler. It checks three things:

  • Each successful logical write adds exactly one increment, even across ambiguous commit retries.
  • A stale read conflicts instead of losing an update.
  • A token replays after the process state is replaced.

A tokenless HTTP failure is never treated as proof of no effect.

Fault at a mutating commit Code
Conflict 1020
Unknown result, not applied or applied 1021
Read version too old 1007
Timeout, not applied or applied 1031

A 1031 can end the request with an ambiguous error; the oracle then accepts only the effect the schedule chose. Worker commits get faults too. Separate scenes delay storage reads or fail them with 1009 or 1037.

The model. A commit conflicts when its non-snapshot read ranges meet a write-conflict range committed after its read version, absent keys and phantoms included. Blind writes do not conflict with each other. Every historical version is kept, so 1007 comes only from a scheduled fault. A limited range read keeps its whole requested range as a conflict range. So the model can report extra conflicts; do not use it to study contention. An operation the model does not implement fails closed.

Each run first calibrates the model. The calibration covers empty values, absent-key and range conflicts, atomic adds, mutation order and versionstamps. It also covers applied and unapplied unknown commits, and the definite retryable errors 1038, 1042 and 1078, which apply nothing.

Broken controls. -negative-control must make each of its controls fail its oracle. The table lists the request-path controls:

Control The oracle sees
Duplicate non-idempotent effect A duplicate effect.
MVCC conflict checking off A missing conflict.
The fdbget attempt drops its prior attempt after an applied 1021 The handoff loses the earlier attempt.
Old metadata entry marked current at a new metadata version Stale metadata.

The first two also shrink to one operation and no faults. The same flag runs 22 controls in all. The others cover:

  • the GRV admission queue (refund), stale lease fences and the token window;
  • TTL margin and clock reads, and stale table statistics;
  • stale stream splits and trims, and the retired-stream margin and images;
  • PITR epoch, toggle and cut;
  • export files, deltas and collection

(main.go). These controls show that the checks can see the failure; they are not product bugs.

Not covered. The C client, its futures, callbacks and memory are not run. The overlaid seam lines run in place of the shipped lines, so those lines are not tested here. The controller orders modeled I/O callbacks, not every Go instruction. A process replacement is lost volatile state, not an OS crash, disk recovery or a network failure. No latency, capacity or real-cluster recovery claim follows; the fault campaigns and soak checks cover the real cluster.

What a broken control shows

Matching traces can miss a mistake shared by both paths. For the sequential campaign's generated operations, the simulator also compares responses and final state to an independent oracle. It prints a replay on failure. Use the same source, harness and toolchain to replay the seed.

For example, the late-commit stress contract deliberately omits the native client's resolution barrier. It checks whether the oracle detects a duplicate effect when the modeled original applies after an unknown commit reply, under the modeled schedule. It does not demonstrate a bug in the shipped client. See the late-commit contracts and controls.

Lifecycle scenes

These scenes run real workers on the simulated FoundationDB. They abandon simulated goroutines, not native processes.

Scene What it checks
-gc-crash Token GC, backup staging and expiry GC, stream trim and PITR trim. The old holder commits one page and loses the next without releasing its lease. A cold process takes over on the first scheduled tick at or after lease expiry; a young row survives takeover and an old-epoch replay.
-export-publication A fake S3 transport splits the object effect from the HTTP reply: checksums before the summary, lease takeover after an abandoned completion, an unknown outcome after repeated reply loss.
-system-backup-restore A restore of a retained SYSTEM backup in pages: removing or expiring the backup before the copy ends leaves no target; after it, the table is exact. A competing create keeps its own table.

See the scene descriptions and bounds.

Native client glue

just verify-fdbget-native runs unchanged C glue against a fake client under ASan/UBSan, then TSan. It checks arming/completion/cancel/park/wake/reuse and threaded stress; --mutants catches 14 seeded bugs. Early future frees, blocking callbacks and leaks fail. It has no network/recovery or Go-side execution. Full protocol.

Fault campaigns

Private clusters/ports, owned child processes only. Ledgers classify success, definite failure and unknown: no acknowledged write may be missing, no failed write present, and no tokened write applied twice.

Script Topology Faults Checks
fault-smoke.sh 2 fdyno, 1 FoundationDB SIGKILL of fdyno; a response dropped after commit; FoundationDB stop and restart One winner per conditional create; balances conserved; the lost-response write applied once
fault-smoke-replicated.sh 2 fdyno, 5-process double cluster SIGKILL of a storage process, the log process and fdyno Every acknowledged write present; ledger matches effects
fault-partition.sh 2 fdyno, 5-process double cluster SIGSTOP of the whole cluster, a coordinator majority, a storage majority; log flapping Every item, stream record, index entry and TTL deletion exact
rolling-restart.sh 2 fdyno behind a proxy Ten SIGTERM and SIGKILL cycles under load No 5xx during drain; every key exact; the survivor takes the worker leases
ddl-under-traffic.sh 2 fdyno, 1 FoundationDB Add and drop a GSI, toggle a stream, enable TTL, recreate the table, at 300 operations/s Reads, scans, index and stream key counts exact after each step
fault-coordinator-change.sh 1 fdyno, 5-process cluster Coordinator change under load, then restart Traffic recovers; restart with a stale cluster file fails fast

These use one host/loopback. With old coordinators left alive during a coordinator change, traffic can remain below the 95% target; this case is not stable. Pass criteria.

Multi-host evidence: AZ loss, Region loss and exact scale-out results/hardware.

Nemesis suite

tools/nemesis is a Jepsen-style test for a real multi-process cluster on one Linux host. It records a concurrent client history while it kills, pauses and partitions processes. It then checks the history with Elle, Knossos and Jepsen's bank checker, and with its own native checks. It needs no root.

nemesis run re-executes itself in new user, mount, PID and network namespaces. The harness and its client goroutines run in the "router" network namespace, which holds the iptables rules. The nodes are fdb-1..N (fdbserver) and fdyno-1..M (dynodb).

Each node has its own network namespace and a veth link to the router. A partition between nodes is an iptables DROP rule in the router's FORWARD chain. A client partition uses the router's OUTPUT and INPUT chains, because the clients run in the router's namespace. The harness is PID 1 of its PID namespace: it can signal only its own children, and when it exits the kernel kills everything inside. Runs share nothing, so several can run on one host. By default a run has three fdbserver processes (double, ssd-2) and two fdyno processes.

Fault Mechanism Recorded evidence the checker requires for each part
kill-fdyno, kill-fdb SIGKILL, restart after the hold A kill exit, no restart error, and a recorded PID after the restart (not compared with the old PID)
pause-fdyno, pause-fdb SIGSTOP, then SIGCONT Recorded process state T during the hold; no continue error
kill-fdb-master SIGKILL of the fdbserver that holds the master role As for a kill, and a recovery generation recorded before and after, with the after value higher
partition-fdyno-fdb One fdyno cut from every FoundationDB process, both ways A FORWARD chain with 2 × N rules, where N is the number of FoundationDB processes
partition-fdb-halves FoundationDB split into a minority and a majority A recorded minority m = max(1, (N − 1) / 2), integer division; a FORWARD chain with 2 × m × (N − m) rules
partition-oneway-fdb One FoundationDB process drops all network traffic to one other A FORWARD chain with 1 rule
partition-oneway-fdyno Replies from FoundationDB to one fdyno are dropped; its requests still arrive, so a commit can apply with a lost reply A FORWARD chain with N rules
partition-client Clients cut from one fdyno: an OUTPUT chain for requests, an INPUT chain for replies An OUTPUT chain with 1 rule, and an INPUT chain with 1 rule that need not drop anything
pause-backfill-holder -gsi only, at least 2 fdyno, never in a composite. SIGSTOP of the fdyno that reports holding the index-backfill lease during a gsi2 backfill, until a peer runs backfill pages or 210 s pass, then SIGCONT. See the zombie holder below Recorded state T and no continue error; the target reported the lease while a backfill ran at the stop; a peer's fdyno_index_backfill_pages_total grew while the target was still in state T; the resumed target reported not holding the lease within 30 s
skew-backfill-takeover, skew-backfill-dead-ahead -gsi only, at least 2 fdyno, never in a composite; needs a dynodb built with -tags fdyno_nemesis. During a gsi2 backfill, another fdyno's service clock steps +181 s (dead-ahead: +600 s), so it takes the index-backfill lease from the live holder; it steps back after the holder's fence rejects. dead-ahead first stops that peer until the old holder takes the lease back. See the lease faults below Service clock reports at the step and at the reset; the holder reported the lease while a backfill ran at the step; the peer's fdyno_index_backfill_pages_total grew; the holder's fdyno_lease_fence_rejections_total{worker="index-backfill"} grew. dead-ahead also: the peer in state T, the old holder reported not holding the lease before the stop, and reported the lease again within 240 s after it
restart-fdyno SIGTERM: the fdyno drains (readiness off, DYNODB_DRAIN_DELAY, in-flight requests finish) and releases its worker leases; it stays down for the hold, then starts A clean exit (exit 0) within 60 s, no restart error, and a recorded PID after the restart. A process still draining after 60 s is killed, and the part does not bite
clock-step One fdyno's service wall clock steps by 1 to 60 s, either sign, for the hold, then back. Needs a dynodb built with -tags fdyno_nemesis A service report of the clock it uses at the new offset, then one at 0, each written after its request. Each report has complete fields, service and real times that agree with its recorded difference, and a difference within 1 s of the offset. The reset is requested at least 90% of the hold after the step report. The clock between the two reports is not sampled
disk-full-fdb One FoundationDB process's data directory, a sized tmpfs in the sandbox (-fdb-tmpfs, at least 256m, default 1g when this fault is listed), gets a ballast file until 2% of it (at least 4 MiB) is free. That is below FoundationDB's free-space floor, the larger of 100 MB and 5%. Before the fill, it polls ratekeeper for up to about 20 s for a nonempty reason that does not contain min_free_space. This rules out a limit that persisted from an earlier fill. The reason is cluster-wide, not tied to this disk. Free space before the fill, which sizes the ballast, is read after that wait. Heal deletes the ballast, and restarts the process if it exited during the hold Free space before the fill at or above the recomputed floor and after it below; ratekeeper's performance_limited_by before the fill a nonempty reason without min_free_space (an empty reason is no reading), and after the fill a bite of one of two kinds. Either ratekeeper reports a min_free_space reason (status json probes with a 10 s timeout each, polled for up to 45 s; bite_basis ratekeeper), or, if no probe shows one, the fill itself (bite_basis fill): at least two timestamped free-space samples, at the fill and at the end of the poll, at least 10 s apart, each at or below the target (2% of the tmpfs, at least 4 MiB) and below the floor. Free space between the samples is not sampled. Then: the ballast removed; free space after heal at or above the floor; if the process was restarted, a recorded exit before the restart and no restart error; one second after heal, a harness record that the process had a nonzero PID (not proof that it rejoined the cluster)
disk-eio-fdb, disk-slow-fdb Under disk-eio-fdb, every file read, write and fsync of one FoundationDB process fails with EIO. Under disk-slow-fdb, each one waits 100 ms and then runs. The process's data is served through faultfs, a FUSE loopback file system that the harness builds from tools/nemesis/faultfs and mounts in the sandbox; this needs /dev/fuse and FUSE mounts in a user namespace. fdbserver treats a disk I/O error as fatal and exits, so for fdyno disk-eio-fdb is the loss of that process, as after kill-fdb; under disk-slow-fdb the process stays up and is slow. Heal sets the mode to off and restarts a process that exited. Neither runs in one -nemesis list with disk-full-fdb faultfs reports the mode after the request and counts at least one failed (EIO) or delayed operation within 10 s; it reports off after the heal request; if the process was restarted, a recorded exit before the restart and no restart error; one second after heal, a harness record that the process had a nonzero PID

A composite a+b starts every part, holds once every part bit, then undoes the parts in reverse order. A composite may have at most one part that impairs FoundationDB and at most one part that impairs an fdyno; this counts parts, not processes. A seeded schedule runs faults one at a time in shuffled cycles. Each fault records four ops:

  • start;
  • effective: each part is in place (the process exited, is stopped, or its DROP rules are installed);
  • heal;
  • stop: after the recovery check, which needs FoundationDB available and every fdyno answering. A failed check is recorded and makes the run UNKNOWN.

The drop counters of each rule are read when the rule is removed, after the hold. Every HTTP send is stamped before it is written and after its reply. So the checker can place each send in a fault's effect window, effective to heal. At the end the harness heals everything once and reads every key the history touched.

The checker requires the recorded evidence in the right column above for every part of every stopped fault. A run that lacks any of it, or that records an error, is UNKNOWN. These are records of the harness's own actions and checks, not an independent observation of the kernel. The nemesis README lists each field.

Workload Calls Checkers
list-append TransactGetItems reads; TransactWriteItems appends of unique values; read-write transactions that read first, then append with a size(v) condition on every key read Elle list-append, strict serializability; native checks
register GetItem, PutItem, and PutItem with v = :old (compare-and-set) Knossos cas-register per key; Elle rw-register; native checks
bank TransactWriteItems transfers; TransactGetItems over all accounts Jepsen bank; native snapshot total and non-negative balances

The native checks do not depend on Elle. For list-append they find:

  • G1a (a read of a failed write) and G1b (an intermediate read);
  • duplicate, unknown or wrong-key elements;
  • an acknowledged append missing from the final reads;
  • an unresolved transaction that is only partly visible in one snapshot, or in a verified common cut of the final reads.

For register they find a read of a failed write, of a value nobody wrote, or of an absent item. For bank they find a snapshot with a wrong total, a negative balance or a missing account. They exist because elle-cli 0.1.11 often gives no verdict on the G1a and G1b test histories within its time limit. Every Elle call has a timeout, and a timeout makes the run UNKNOWN.

With -stream-tail (list-append only), the run also tails the table's change stream while automatic splits add shards. Each stream call goes to the next fdyno in turn. The checker orders each key's records by shard lineage. Each record must add exactly one element, and its old image must equal the previous record's new image. After a complete drain, a key's last record must equal its final read. The checker reports 11 anomaly classes, from stream-duplicate to stream-trimmed. Missing evidence makes a run UNKNOWN, and seven log controls must each be rejected as their class. See change streams in the nemesis README.

With -gsi (list-append only), writes also keep two indexes. gsi1 exists from the start. gsi2 is deleted and rebuilt in a loop, so backfills run during faults. About 60% of reads are one-page Query calls on an index, judged like any other read. After the final reads, an audit reads every bucket of both indexes, and each audited list must equal the key's final list. Seven anomaly classes report the differences. Missing evidence makes a run UNKNOWN, and five log and history controls must each be rejected.

Three lease faults test the index-backfill lease:

  • pause-backfill-holder stops the holder with SIGSTOP until a peer takes the expired lease, about 151 s at the 1 s interval;
  • skew-backfill-takeover steps a peer's clock 181 s forward, and the epoch fence must reject the old holder's next pages;
  • skew-backfill-dead-ahead steps the peer 600 s ahead and stops it; the old holder must take the lease back after one lifetime, not after the expiry.
Moment Fault Holder H Peer P Why
A backfill runs waits up to 60 s for a running gsi2 backfill reports holding the index-backfill lease Only a lease holder runs pages.
H stops SIGSTOP H stopped; it does not renew its lease The stop lasts until another fdyno's fdyno_index_backfill_pages_total grows, or until 210 s pass.
P takes over H's lease expires; P takes it and runs pages A growing peer counter shows that the old lease expired and a peer took it: about 151 s at the 1 s interval. Pictured: P's counter grows before 210 s pass.
H continues SIGCONT H after a stop longer than the lease, leaves its pass by one of three exits: between pages, its renewal check finds the lease lost; inside a page, the operation in flight is past its deadline and fails, and no new attempt starts; a stop between the renewal check and the next attempt's lease check reaches the epoch fence This fault tests takeover and loss of the lease, not whether an epoch comparison rejected H. The harness records H's fence rejection counter before and after; no rule requires a value.
The check reports not holding the lease (its own gauge) within 30 s If no sample in the 30 s after H continues shows it not holding the lease, a missing sample included, the run is UNKNOWN. The audit, Elle and the native checks judge correctness, as in every -gsi run.

See global secondary indexes in the nemesis README.

A run's verdict is one of three:

  • PASS: every evidence rule holds and no checker finds an anomaly. The rules include:
    • a complete history;
    • every send of an op between the op's invoke and its completion;
    • every completion matching its invoke (same keys, same written values);
    • every requested fault bit, stayed in place for at least 90% of the hold, was recorded as recovered, and had a client send in its effect window (to the faulted fdyno for a fault on one fdyno);
    • every checker call returns one well-formed result per input;
    • a verified final heal, followed by final reads that cover every touched key;
    • at least two free-space samples, and at least as many as the run time in seconds divided by 10 (a count, not a bound on gaps);
    • a recorded free-space minimum at least 1 GiB above FoundationDB's 5% free-space reserve.
  • FAIL: every evidence rule holds, and an external checker (Elle, Knossos or the bank checker) reports invalid or a native check finds an anomaly.
  • UNKNOWN: an evidence rule fails. An anomaly found in such a run is kept as a candidate finding, not a verdict. UNKNOWN is never a claim about the product.

A suite adds a fourth outcome, INCONCLUSIVE. Every run has its expected outcome, but no run has a fault witness. The expected outcomes are PASS for fault runs, and FAIL with the expected anomaly class for broken-client controls.

A witness is an unresolved write whose effect a later successful read observed. It has exactly one write send that left the client, in flight during a verified effect window. That is a temporal association between a fault and a lost reply, not proof that the fault caused it. It also does not prove that the send met a DROP rule.

Each suite also runs broken clients that must fail:

  • split-read: list-append reads keys with separate GetItem calls, so Elle must find a G-single, G-nonadjacent or G2 cycle;
  • drop-write: register acknowledges writes it never sent, which is not linearizable;
  • drop-credit: bank sends only the debit, which gives a wrong total.

The composite runs, in the ci and composite profiles, and the gsi-takeover and gsi-ahead runs use a dynodb built once per suite with -tags fdyno_nemesis. Every other run uses the default build.

The nemesis CI workflow runs the ci profile on pushes to main. It also runs it on same-repository pull requests that change internal/, cmd/, tools/nemesis/, go.mod, go.sum or the workflow. It runs the ci, composite, disk, stream and gsi profiles nightly. The gsi-zombie, gsi-takeover, gsi-ahead, disk-io and large profiles run on manual dispatch only.

Profile What it runs When
ci The checker self-test; the three workloads under the six base faults; one list-append run under the newer faults, clock-step and five composites (clock-step+kill-fdb among them); the three broken-client controls Pushes, pull requests, nightly
composite Composite faults with the fdyno_nemesis build Nightly
disk disk-full-fdb alone, with kill-fdyno and with partition-client, on each of the three workloads Nightly
stream List-append with -stream-tail twice: 90 s under kill-fdyno, pause-fdyno, partition-fdyno-fdb, partition-oneway-fdyno, partition-client, kill-fdb-master, kill-fdb, kill-fdyno+partition-fdb-halves and restart-fdyno; 60 s under the disk profile's three faults Nightly
gsi List-append with -gsi for 180 s under restart-fdyno, kill-fdb-master, restart-fdyno+partition-fdb-halves, partition-oneway-fdyno, restart-fdyno+kill-fdb, pause-fdyno and kill-fdyno Nightly
gsi-zombie List-append with -gsi for 150 s under pause-backfill-holder and partition-oneway-fdyno+kill-fdb-master, which gives lost-reply witnesses Manual dispatch
gsi-takeover List-append with -gsi for 150 s under skew-backfill-takeover and partition-oneway-fdyno+kill-fdb-master Manual dispatch
gsi-ahead List-append with -gsi for 240 s under skew-backfill-dead-ahead and partition-oneway-fdyno+kill-fdb-master Manual dispatch
disk-io Each of the three workloads for 60 s under disk-eio-fdb, disk-slow-fdb and partition-oneway-fdyno+disk-slow-fdb Manual dispatch
large Each of the three workloads for 120 s on five fdbserver processes (triple redundancy, five coordinators) and three fdyno processes, under the six base faults (kill-fdyno, kill-fdb, pause-fdyno, pause-fdb, partition-fdyno-fdb and partition-fdb-halves) plus kill-fdb-master and partition-oneway-fdyno Manual dispatch

In gsi-zombie, the stop starts within about 25 s plus its 60 s wait. That is before the last gsi2 is kept at 90 s, so the audited backfill is the one the peer finished.

The clock seam is nemesis_clock.go, compiled only with the fdyno_nemesis tag. If a process's working directory holds fdyno-nemesis-clock at start, the service's wall clock becomes the real wall clock plus the signed duration in that file. The process rereads the file every 100 ms. Monotonic deadlines and budgets are not shifted. After each change the process writes fdyno-nemesis-clock.applied with the offset and the service and real clocks at one instant. The default build compiles nemesis_clock_off.go, a no-op. The workflow first checks that the default build does not compile nemesis_clock.go and that a default dynodb binary contains no fdyno-nemesis-clock string (workflow).

Limits:

  • The seed fixes the workload and the fault schedule, not the interleaving.
  • It runs on one host, and the veth links add no latency.
  • Clock skew moves fdyno's service clock only (clock-step, within the one-minute clock bound). Go timers, deadlines and the system clock do not move. FoundationDB clocks are not skewed, because libfaketime 0.9.10 breaks fdbserver 7.3.51 start.
  • There are no Region tests yet.
  • The disk faults are a full disk (disk-full-fdb, on a tmpfs: no block device and no fsync cost), and EIO or a fixed 100 ms wait. The EIO or wait applies to every file read, write and fsync of one FoundationDB process (faultfs).
  • There is no partial EIO (one file or one operation kind) and no torn or lost write.

EC2 concurrent-history smoke

On that 12-storage/three-API Redwood fleet, list-append, register and bank each passed one 180 s Elle run; three 15 s broken controls were rejected. Faults killed/paused fdyno/FDB and partitioned fdyno from FDB. This did not inject clock skew or qualify arbitrary partitions.

EC2 concurrent-history campaign

FoundationDB 7.3.51/Redwood, three_data_hall, three AZs: 12 storage, 6 log, 3 stateless, 9 coordinators, 3 API hosts and 1 client. Three seeds each ran three 1 h histories:

  • list-append: Elle strict serializability;
  • register: Elle strict serializability and Knossos per-key linearizability;
  • bank: constant snapshot total and non-negative balances.

Each hour used shuffled fault cycles; one cycle runs every listed fault once. Each fault had 90 s before it, then a 60 s hold, plus setup and teardown. Faults included kill and pause of fdyno and FDB, and FDB-traffic partitions of a minority, a majority ring or a whole AZ. They also included ±30 s API-host clock steps.

All nine histories were valid, about 100,000 operations each. Split-read, dropped-write and dropped-credit controls failed. On that pre-v0.1 build, admission and cluster-version 503s counted as definite failures, because no read or write had begun. In v0.1, admission refusals are 400 ThrottlingException. Other 5xx responses, timeouts and resets are indeterminate. Limits: one Region, FDB ports only, API-host clocks only, and one hour per history.

Campaign check rule. The harness ran the checker once per history, with a limit of 1,800 s. A positive run counted only if the checker exited 0, with every check valid=true. A control counted only if it exited 1 with at least one check valid=false. Any other exit, or the limit, stopped the whole campaign, so a hung check could not pass. The first campaign (r1) stopped this way: Knossos returned unknown (out of memory) for 7 register keys. The published register history comes from the rerun (r2).

Native re-check. The five kept list-append histories were checked again with nemesis native -workload list-append from tools/nemesis at 4089ce0c. That check looks for G1a, G1b, duplicate or unknown elements, acknowledged appends missing from the final reads, and partly visible unresolved transactions. It does not search for cycles; Elle does that. It covers the list-append histories only, not register or bank.

History Length Operations Keys Elle (campaign) Native Unresolved appends: seen / not seen
r1 seed 7411 3,606.6 s 101,282 2,377 valid PASS, 0 anomalies 2 / 272
r2 seed 19087 3,606.7 s 100,832 2,362 valid PASS, 0 anomalies 3 / 205
r2 seed 39821 3,606.5 s 97,618 2,292 valid PASS, 0 anomalies 3 / 320
r1 stage0 1,205.7 s 32,284 759 valid PASS, 0 anomalies 1 / 91
r2 stage0 1,206.1 s 33,338 782 valid PASS, 0 anomalies 0 / 85
r1 split-read control 35.4 s 913 24 G-single-item PASS 0 / 0
r2 split-read control 35.4 s 912 24 G-single-item PASS 0 / 0

An unresolved append has an unknown outcome: a timeout, a reset, or a 5xx other than the admission and cluster-version 503 of that build. "Seen" means a later successful read returned it, so it committed although its reply was lost. "Not seen" means a final read did not return it. That read was invoked at least 10 s after the append completed. "Not seen" does not prove that the append never commits. The native check passes the split-read controls, as expected: a split read is a cycle, and only Elle finds cycles. See the full record.

EC2 fault-schedule fleet

The first round ran many small, independent clusters on two hosts, each cluster with its own seed and fault schedule (tools/jepsen-fleet at 913623e3). The two c8id.8xlarge hosts (32 vCPU, 64 GiB, instance-store NVMe) were in one AZ. Each host ran 20 clusters in each of the three 30-minute batches, and 13 and 12 clusters in the 15-minute batch.

Each cluster had three nodes. Each node ran one fdbserver (FoundationDB 7.3.51, double, ssd-2) and one dynodb with DYNODB_OPERATION_TIMEOUT=3s, in its own network namespaces. Each history's client used 8 workers and targeted 60 operations/s per cluster. The harness held each fault, or overlap of two faults, for 8 s. It waited 10 s between windows, not counting the time the start and stop hooks took.

The faults were:

  • network partitions: whole node, one way and client side;
  • added latency;
  • kill and pause of fdbserver and of dynodb;
  • an FDB recovery: the master killed, counted only if the recovery generation advanced;
  • a full disk under FDB's free-space floor.

42 of the 86 histories ran schedules with overlaps of two faults.

Each history was judged by its assigned checker only:

Workload Checker Histories PASS
list-append Elle strict serializability, plus native G1a/G1b, duplicate, lost-write and partial-transaction checks 29 29
rw-register Elle strict serializability, plus Knossos per key 29 29
bank Total conservation and non-negative balances (not strict serializability) 28 28

Of the 86 histories, 14 ran 15 min and 72 ran 30 min. A history counted as PASS only if three things held:

  • every fault entry of its schedule showed its effect in at least one window while client operations were in flight (for example dropped traffic, a new process ID or a new recovery generation);
  • every final read succeeded;
  • the checker's summary was bound to that history by digest. Of all fault windows, 7,292 of 7,310 showed the effect while client operations were in flight. Any other result was INCONCLUSIVE. There was no ANOMALY and no INCONCLUSIVE result.

Negative controls ran in every batch with deliberately wrong clients: a split read (list-append), a dropped write (rw-register) and a dropped credit (bank). All 12 were rejected with their intended witness: G-single-item, Knossos invalid keys and wrong-total. A control that was not rejected would have stopped the round. Two smaller runs are reported apart:

  • A mixed stress workload (GSI, streams, TTL, transactions, bank) passed 28 of 28 histories and rejected 4 of 4 broken-acknowledgement controls. Its fault overlap was not measured.
  • The nemesis suite runner passed 11 of 11 list-append histories and rejected 4 of 4 split-read controls. It runs three fdbservers and two dynodb processes per cluster in its own sandbox.

At 20 clusters per host, the highest sampled 1-minute load average was 7.81 and the lowest sampled MemAvailable was 50.8 GiB. Load average is not CPU use, so this does not show that a higher density fits. Scope: no anomaly was found in these 86 histories under these faults, workloads, durations and densities. This is not a clock-skew result, an availability result, or a stress result for export/import, backup cleanup or restore. See the full record.

Client fault injection

Release-client CLIENT_BUGGIFY hooks run inside fdyno only. Reads inject 1007/1009; before commit: 1020/1007, proxy-memory 1042/1078 and 1021; after successful commit: 1021; timed commit:1031, delayed up to 5 s. Missing acknowledged writes, duplicate tokened writes, wrong successful reads or stuck workers fail. Unknown outcomes must reconcile under the write contract. Suites without injection remain a separate check. Probabilities/commands.

Soak

Two 26 h runs (n=1 each) shared one c7i.2xlarge, 16 GiB RAM, 100 GiB gp3 host. Each delivered 300 operations/s with default worker intervals and retention, using ssd-redwood-1 (both before cluster versioning, pre-v0.1 builds; runs soak-24h-steady-20261117T023515Z and soak-24h-replicated-20261117T021700Z).

Harness Result Observed checks
Steady state: one fdyno PASS; CDC boundedness inconclusive 28,079,998 operations, zero client errors
Replicated: two fdyno, five-process double, process kills INCONCLUSIVE: 40 pass, 0 fail, 1 inconclusive 28,077,258 operations; all 64 client errors inside fault windows

Both found bounded tokens, items and TTL indexes, and a bounded count of the extra record that pre-v0.1 builds wrote for every write request. Both found zero final-read mismatches, and no stream errors or resets across over 22.5 million records each. Default CDC trimming began, but boundedness needs more than about 53 h. Final keys were absent or expired, so this is not a live-value durability audit. Loopback faults do not qualify multi-host partitions. Soak profiles include short-retention runs and reproduction commands.

Backup and recovery drills

Drill Checks
scripts/dr-drill.sh Export a backup, import it into a second cluster, restore and compare every item. A corrupt archive is refused; a changed item is detected.
scripts/fdb-native-local-restore-drill.sh fdbbackup and fdbrestore into a second cluster: every key and value equal.
scripts/migrate-e2e.sh dynodb migrate from DynamoDB Local: a table with GSIs, an LSI and TTL, one million items, writers during the copy and catch-up, an interrupted copy, a full stream replay and imports of DYNAMODB_JSON and ION exports. Every item is compared by an independent oracle, and a changed and a missing item are detected.
1 GB migration from AWS DynamoDB dynodb migrate from a 1 GB on-demand table in us-east-2 with a GSI, TTL and a stream, with 191 writes per second during copy and catch-up. Count and hash per key bucket, every acknowledged live write and 100 index queries equal after cut-over.

A planned 5 TB EC2 restore after a backup-version fence and drain is in measured at 5 TB. No sudden-loss RPO was measured. PITR restores run in the background.

A single-host check varied the changes after the restore point while keeping the item count fixed. It used one run per point, and sampled restored values matched the pre-change values. Restore work grew with those changes, not only table size. This does not set a production timing bound.

Model checks

TLC explores every reachable state in each bounded configuration. Every listed broken variant must violate its named rule; checks fail when a source pattern that a model relies on is missing. Java 11+ and a pinned SHA-256-checked tla2tools.jar are required.

Model and command Promise checked Bounds Result
Split BatchWriteItem chunks · just verify-batch-write A successful response lists only definite misses in UnprocessedItems; a chunk with an unknown outcome stops the batch with an error and runs no later chunk. Three ordered chunks, each committed, definitely not committed, throttled or unknown; 1 config Pass; 2 of 2 controls caught
Client request tokens · just verify-tokens A tokened TransactWriteItems resend that follows the client procedure applies at most once. Two processes, one token, one resend that can retry internally, fixed clock leads of up to one minute, no pause; 30-second and 5-minute budgets; 2 configs Pass; 4 of 4 broken variants caught
Transaction conditions · just verify-txn-conditions Two TransactWriteItems requests cannot both succeed when each checks that the other's put key is absent. A false condition blocks the put. Two processes, two keys, one guarded put per process and one possible conflict retry Pass; 2 of 2 controls caught
GSI convergence (asynchronous GSIs) After the GSI change log drains, a GSI equals the projection of the table. A GSI read may trail the writes until then, as in DynamoDB. Edge index sweep and DDL-under-traffic fault run: every GSI is compared in full with the table after a bounded wait Tested; pass in the bounded asynchronous GSI model
GSI generation fence (asynchronous GSIs) No entry of a deleted index generation survives into a new ACTIVE index of the same name. TestGSIBackfillIsFencedByGenerationAcrossDeleteAndRecreate ("GSI apply metadata read conflicts with a GSI delete"); the only GSI writers are the backfill page, the change-log apply and DeleteIndex; the first two read the index generation in the transaction that writes, and DeleteIndex clears the index range and retires its backfill job Tested; pass in the bounded asynchronous GSI model
GSI ACTIVE after drain (asynchronous GSIs) A new GSI becomes ACTIVE only after every change record committed at or before its drain version is applied. TestGSIBackfillIsFencedByGenerationAcrossDeleteAndRecreate ("ACTIVE waits for records older than a page after the exhausted scan", "ACTIVE waits for a record committed at exactly the page read version") and a reviewed code proof Tested; pass in the bounded asynchronous GSI model
GSI backfill pages (asynchronous GSIs) A backfill page re-reads its job and the table metadata, commits a nonempty ordered prefix with the cursor at its end, and with a delete, crash or second worker it loses no entry and leaves no orphan. TestIndexDeleteRacingBackfillPageLeavesNoOrphan, TestIndexWritesBetweenBackfillPagesAreMaintained, TestGSIBackfillResumesFromPersistedCursorAfterCrash, TestGSIBackfillIsFencedByGenerationAcrossDeleteAndRecreate, TestDeleteTableAndDeleteGSIRetireBackfillJobs and the edge-index suite. The retired model's five broken variants, applied to the code, each failed a Go test or the edge-index suite. Tested; the bounded asynchronous GSI model checks one-item pages with a delete, a crash and a second worker
Asynchronous GSIs · just verify-async-gsi An ACTIVE GSI holds each item's entry as of its last replayed change record (just before its oldest pending one), and equals the projection of the table once the change log is replayed. Two items, two index keys, three writes, two index generations, two consumers and two backfill workers with crashes, one log shard; 1 config Pass; 8 of 8 broken variants caught
Transaction read snapshot · just verify-txn-get The modeled TransactGetItems reply does not mix an old inline value with newer chunks. One inline item, one chunked item, one atomic pair write and one staged read Pass; 1 of 1 controls caught
TTL expiry drain · just verify-ttl-drain A stale expiry entry cannot delete a live replacement. A backward clock step within a drain attempt cannot strand the original row without its entry. One recent TTL, one bucket, one drain attempt, one possible blind replacement and backward clock step Pass; 3 of 3 controls caught
Worker leases · just verify-leases No stale-holder write after takeover. Two processes, clock skew, a clock far ahead, pauses, crashes, release after each pass Pass; 10 of 10 caught. Separate backup staging submodel: one name, two generations, one staged page each. One config passes; 2 of 2 broken variants caught. TTL range progress checks an old drain across takeover and two bounded passes by the same peer on a fixed range with two tables.
Change streams · just verify-streams Ordered changes, once each; explicit trim losses. Splits, automatic splits, trims, re-enable, 1 MB pages, a restart; 5 configs Pass; 11 of 11 caught. Iterator starts: exclusive LATEST and fractional AT_TIMESTAMP with prefix trim; one shard, four records, pages of one or two. Two configs pass; 4 of 4 broken variants caught. ARN identity checks old ARN lookup across deletion, one same-name replacement, and retained metadata cleanup. One config passes; 2 of 2 controls caught.
Stream reshard replay · just verify-streams After a lost commit reply, an internal retry returns its own live epoch and boundary, even after a later split. One enabled generation, two splits, one retry; both epoch boundaries stay readable One config passes; 2 of 2 controls caught; a witness returns the original result after the later split
DescribeStream snapshot · just verify-streams One response uses epoch metadata and boundaries from the same snapshot even if the old epoch is pruned. One generation, two live epochs, one prune, one page One config passes; the later-version read control is caught; a witness returns the old snapshot after pruning commits
DescribeStream continuation · just verify-streams A continuation excludes the cursor shard and still returns the next shard when pruning removes the cursor. Two pages of one shard, one closed parent, two surviving shards, one optional prune One current case, two negative controls, one post-prune resume witness
Point-in-time restore · just verify-pitr Restore equals the cut; retained-window admission, fenced pages and complete publication. Reconstruction, fixed cut scan, changing periods, asynchronous jobs and name reuse; window: 4 ticks/3 writes/2 changes (1–4 units); fixed scan: 2 keys/2 writes/2 ticks+skew; jobs: 1 job/2 pages, 2-job identity case, 2 tokens/bounded leases; progress: 3 positions/6 records with bounded page cost; early trim: 3 passes/2 pages Pass; 22 of 22 caught
Rolling backup source identity · just verify-pitr Deleting the source before the last rolling page cannot turn the emptied range into a successful truncated backup. One staged page, one remaining row, one source deletion and one same-name replacement Pass; 2 of 2 controls caught; a witness publishes when the last page was read before deletion
Ordered backup page read-ahead · just verify-pitr The archive export and the backup audit consume pages in order and cannot succeed after a read error. Two immutable pages and two readers; the first page may fail One config passes; 2 of 2 controls caught; a witness consumes both pages in order when the later read finishes first
Backup restore publication · just verify-pitr A backup restore becomes ACTIVE only after its last page. A running restore keeps its backup: DeleteBackup answers BackupInUseException. One RUNNING job, two backup pages, one table deletion, one backup deletion Pass; 2 of 2 controls caught; a witness deletes the backup after completion
Retained SYSTEM backup EOF · just verify-pitr Removing a backup before checked EOF cannot publish a partial restore. Removal after checked EOF does not change the restored rows. One frozen backup, two row pages and one empty EOF page, one source removal One config passes; 2 of 2 controls caught; post-EOF removal witness reaches publication
Backup consistency after fallback · just verify-pitr A fresh rolling page cannot be published as SNAPSHOT. The create reply uses the published label. One default-mode backup, two pages, pinned read version may age out after the first One config passes; 2 of 2 controls caught
Backup restore failure fence · just verify-pitr A stale worker cannot mark a restore FAILED or delete its target after a peer takes over. One RUNNING restore, its CREATING target, one batch error, one takeover One config passes; 2 of 2 controls caught; a witness lets the current holder end the job
Backup generation publication replay · just verify-pitr An old publisher cannot complete its replacement. A retry can return its own published metadata. One format-3 generation, one eligible reclaim or one retry of an unacknowledged commit One current case, two negative controls, one replay witness
Empty backup archive identity · just verify-pitr An empty archive cannot finish if its final identity read sees a replacement backup. One empty format-3 backup, one same-ARN recreation, one final read One current case, one negative control, one replacement-after-read witness
Archive import staging throttle · just verify-pitr Only forced throttles enter the retry wait. Import advances the buffered group only after staging succeeds. One group, one failed attempt, one successful retry or cancellation during backoff One current case, two negative controls, one retry witness
Table export · just verify-export Exact, stable export files matching the manifest. Five items, three workers, four lease takeovers, stale puts Pass; 2 of 2 caught
Backup page-group replay · just verify-pitr A staged group can replay without advancing the page count only when all expected manifests and the advanced count match. One STAGING generation, two pages, one retry; synthetic partial or mismatched storage inputs One config passes; 3 of 3 controls caught; a witness accepts an already counted group
Backup abort cleanup · just verify-pitr Cleanup after an uncertain backup write preserves a published backup and a replacement generation. One backup ARN, one publication or stale reclaim, one cleanup One config passes; 2 of 2 controls caught; a witness removes the caller's own staged generation
Backup GC cursor after an error · just verify-pitr With a successful cursor save, the next pass skips an ordinary failure. Throttle, fence loss and cancellation do not save a new cursor. Two fixed names, one name per pass, one failing visit One current case, two negative controls, one next-name witness
Export snapshot · just verify-export-cut Full exports match the cut; incremental exports hold changed keys at both cuts. Two keys, TTL, skewed stamps, the trimmer, DeleteTable, PITR off; full and incremental Pass; 6 of 6 caught
Import source identity · just verify-import-source An import loads only after a complete, ordered listing. A completed import uses pinned records across crashes and never adopts a new identity for a legacy prefix. Listing: two pages, one takeover. Loading: one object, three rows, two crashes, S3/file and legacy modes. Pass; 8 of 8 caught (5 loading, 3 listing)
Migration catch-up · just verify-migration Unconfirmed target writes cannot advance the checkpoint or produce caught_up. Shard order checks that a parent's older image cannot overwrite its child's newer image, and a missing unfinished parent prevents caught_up. Checkpoint: one closed shard, one page, two keys, one resume after drain. Order: one known closed parent and one closed child, one record each for the same key, one parent trim, no restart. Two configs pass; 4 of 4 controls caught
Migration Copy resume · just verify-migration Each unfinished segment resumes at its own saved key. A saved done flag requires acknowledgment of its final page. Two fixed Scan segments, two acknowledged pages per segment, one restart One config passes; 2 of 2 controls caught; a witness replays an acknowledged page that was not saved
Migration Copy completion · just verify-migration Copy can save its completion marker only after all segments finish. Cancellation that stops dispatch early prevents the save. Two segments, one worker join, one optional early cancellation One current case, two negative controls, one completion witness
Index cursors · just verify-cursors On a fixed index, each page advances past its last examined row without skips or repeats, even if the filter returns no rows. Four entries across two partitions, tied sort keys, forward and reverse Query, ascending Scan; one or two entries per page Pass; 2 of 2 caught
Expired conditional delete · just verify-ttl-delete The modeled delete cannot remove a live replacement, expose an expired image, or use the success return option on failure. One expired row, an absence-guarded delete, one live replacement Pass; 3 of 3 controls caught
Query generation · just verify-query-generation A modeled strong query cannot return a cached page from a retired table when its read version sees the table missing or replaced. One retired table, one replacement, one strong base-table Query Pass; 2 of 2 controls caught
Transaction token payloads · just verify-txn-token-mismatch In the model, a live token guards one write; a different payload gets a mismatch and an identical resend does not write again. Two unequal fingerprints, disjoint data keys, one token and one resend Pass; 3 of 3 controls caught
Conditional UpdateItem increments · just verify-update-increment In the model, each committed increment counts once and each UPDATED_OLD reply shows the counter before that commit. Two writers, one existing whole-item counter, no deletion or other writes Pass; 3 of 3 controls caught
Conditional PutItem claims · just verify-put-claim In the model, at most one put wins and the rejected put's ALL_OLD shows the winner. Two writers, one initially absent whole-item key, no deletion or other writes Pass; 3 of 3 controls caught

Input admission rules are covered by the conformance suites.

What a broken variant shows

A broken variant is a small change to a model that matches a plausible code mistake. TLC must find a counterexample to the variant's named rule; if it does not, the check fails. Examples:

Model Broken variant (the code change) Rule that breaks
Worker leases The lease check runs in its own transaction, or as a snapshot read Always fenced: no write from an old lease pass commits after another process takes over
Change streams A write does not conflict with the metadata change, so its record lands in a closed shard No gap: a consumer at the end of a shard has every record of that shard, or was told that some were trimmed
Point-in-time restore The undo applies records oldest first Exact: a completed restore equals the table after the cut
Table export The summary is put while data files are still written Exact: once the summary exists, its manifest lists files that hold every item at the cut, once each
Export snapshot A page reads at a version the delta does not cover yet Exact: a completed export equals the table after the cut
Import source identity A mutable file is verified only at end of file Pinned completion: every published row comes from its pinned object

Each model's README describes its broken variants. The import model also checks a design that fdyno rejected; it is not a bug found in shipped code. In that design, an import could commit a changed prefix, crash and publish with a matching final digest. So fdyno verifies a private snapshot of the file before the first batch.

Model checks in CI

On every push to main, the formal verification workflow checks those source patterns without Java or FoundationDB. When a push changes their inputs, it selects TLC runs and broken controls for these models: PITR, export snapshots, client request tokens, migration catch-up, transactions, conditional writes, TTL, and Query. It runs all selected suites if the push changes the workflow, go.mod or go.sum, or if there is no comparison base (ci.go). The remaining models run TLC through their just verify-* commands, not in this workflow.

Model findings and exact controls include code maps, state counts and full protocol writeups.

A model check and its source pattern checks answer different questions. A broken configuration shows that the checker rejects a specific bad protocol inside the model. A source pattern check confirms that a pattern the model relies on is still present; it does not execute that path. For example, the lease model checks that a paused holder cannot commit a worker effect after takeover. The FoundationDB integration test pauses actual worker effects across a lease transition. Neither one alone checks every worker schedule on a running fleet.

Not covered

Models do not execute the binary, network or FoundationDB. They check safety with few items/writers/faults. Backfill and bounded PITR progress also check liveness under their stated fairness and cost assumptions.

Model Not modeled
Split BatchWriteItem chunks The transaction attempts inside a chunk, how the runner classifies each error, and split planning
Transaction conditions Expression parsing, TTL, item encoding, token replay, DDL, timeouts, and other request shapes
GSI Query TTL snapshot Multi-page reads, index divergence and missing base rows, composite keys, other read APIs and projections, clock progression and read freshness
Transaction read snapshot Chunk parsing and corruption, retries, TTL, metadata changes, freshness and position or projection rules
TTL expiry drain Five-year age limit, clock-skew margin, retries, range leases, duplicate entries, expiry backfill and stream or undo records
Worker leases The restore job's own lease, staging heartbeats, clock steps
Change streams The consumer model does not check write-rate estimates or worker scheduling. Iterator starts exclude splits during iterator reads and multiple consumers. The ARN identity submodel does not check cleanup timing, restores in progress, or labels older writers did not reserve.
Stream reshard replay The runner's retry decision, fresh client requests, epoch pruning, stream retirement, and errors in the boundary read
DescribeStream snapshot Consistency across pages, pruning eligibility, disable boundaries, or unrelated read errors
DescribeStream continuation Session-wide snapshot, other topology changes, shard filters, record reads, or pruning eligibility
Index backfill Physical retention or deletion of old table data, repeat failures or fresh client requests after DeleteTable, projections stored in chunks, byte formula and native FoundationDB limits
Point-in-time restore Physical multi-item page sizing, indexes, unbounded jobs/fences, GC of the admission record outside request-lifetime bounds. Progress assumes listing fits the pass budget, consecutive local passes and bounded payload cost; no arbitrary-latency/restart guarantee. Window does not extend reconstruction skew/copy bounds.
Ordered backup page read-ahead Page contents, cancellation, third or later pages, and the archive or audit output
Backup restore publication Item and index contents, retained SYSTEM backups, worker takeover, retries, and the PITR path
PITR apply chunk boundary Malformed staged data, tuple encoding, write byte budgets, leases, and final publication
Retained SYSTEM backup EOF Backup ARN reuse, expiry or cleanup timing, physical retention, row decoding, and the restore pin
Backup consistency after fallback Item contents, expiry timing, forced rolling, prefetch, source table reuse, GC, and publication retries
Rolling backup source identity Pinned page reads, concurrent item changes, retained directories, cleanup timing and retries
Backup restore failure fence Target replacement, lease expiry alone, error classification, retry results, or the next worker's actions
Backup generation publication replay Page contents, reclaim timing, retry decisions, deletion of COMPLETE metadata, later client requests, and the HTTP reply
Empty backup archive identity Intermediate absence, nonempty pages, archive bytes, sink failures, continued source existence, or destination publication
Archive import staging throttle Repeated throttles, priority, timer duration, cancellation races, durable group replay, and publication
Table export Object-store failures, the cut and page reads (the snapshot model covers them), client tokens, retention
Backup page-group replay Payload bytes, manifest encoding, item and byte totals, owner changes, runner decisions, source reads, and publication
Backup abort cleanup Cleanup timing, staleness timing, other storage formats, source reads, and the original request's retry or reply
Backup GC cursor after an error Cursor write failures, concurrent cursor writes, error classification, removals, wraparound, and repeated-pass progress
Export snapshot Pages of more than one key, delta chunks and page bounds, the paged cut search (the restore model covers it), the lease
Import sources Prefix-wide atomicity, parser/index correctness, malicious stores, hash collisions, physical corruption, completed imports or progress without a correctly mapped worker
Migration catch-up Open shards, parents never tracked, wider shard topologies, checkpoint I/O failures, HTTP and SDK parsing, writes that arrive after resume, or target equality at cut-over
Expired conditional delete Sweeping, expiry clock calculations, index and stream effects, and unknown commit outcomes
Query generation Eventual reads, index queries, cache watches, pagination, and backup retention
Transaction token payloads Fingerprint encoding, expiration, cleanup, unknown outcomes, and timeouts
Conditional PutItem claims TTL, deletion, more writers, batching, unknown outcomes, and timeouts
Migration Copy resume Mutable source data, Scan order, item values, retry classification, checkpoint I/O failures, and exactly-once target writes
Migration Copy completion Worker errors, ambiguous writes, mid-page progress, checkpoint I/O, late cancellation, and catch-up admission

Continuous integration

CI runs unit, conformance, operations, faults, backups and release checks plus a non-blocking short soak. scripts/ci/run-all-local.sh runs them on one host. just staticcheck rejects findings outside the reviewed file/check/message baseline; only a reviewed change updates it. fdyno_assert checks boundaries, epochs, progress, CDC and sizes: CI runs tagged conformance, 100 simulation seeds, fuzz and units with/without the tag; just sim uses 1,000 seeds. Release builds omit checks and argument evaluation. Exact protocol.

Security checks

SigV4 signs every conformance request. Integration tests cover policies, rate limits and production mode; ops/edge-auth cover TLS/mTLS/reload and protocol edges. Codec/JSON/stored records/request/expressions/PartiQL/tokens/ signatures/HTTP framing fuzz targets run seeds in go test; manual go test -fuzz campaigns extend them. scripts/ci/run-fuzz.sh uses fdyno_assert, five seconds per target (FUZZ_SECONDS 1–60; FDYNO_ASSERT_TAGS='' disables it). Finite campaigns do not prove memory safety. No external audit or penetration test has run.

Not yet tested

  • Arbitrary WAN partitions, FoundationDB-host clock skew and compound failures.
  • Multi-Region AWS/WAN validation of symmetric satellite policies for either promoted data Region, including a second fault after promotion. Local recruitment checks are not that qualification (Region rebuild). Shape B whole-region failback; 5 TB recovery across Regions; adding storage hosts at 5 TB.
  • Long-window default CDC boundedness.
  • Recovery objectives, capacity and latency for your production workload.
  • Multi-host Kubernetes; the Helm chart has run only on single-host kind.

References

  • FoundationDB, Developer Guide: Transactions.
  • Jingyu Zhou et al., FoundationDB: A Distributed Unbundled Transactional Key Value Store, SIGMOD 2021.
  • Kyle Kingsbury, Consistency Models.