{
  "schemaVersion": 1,
  "slug": "read-repair-traces",
  "kind": "dataset",
  "title": "Read repair: three constructed state traces",
  "summary": "A finite example contrasts a narrow blocking repair, response-only reconciliation and a full-partition read, without running a Cassandra cluster.",
  "published": "2026-10-13",
  "updated": "2026-10-13",
  "evidenceType": "constructed-state-traces",
  "method": "Each independent scenario starts with A=(1,1), B=C=(0,0) for rows x and y of one partition after an unsuccessful quorum write reached A only. A read contacts A+B; a second read contacts B+C. Reconciliation chooses the higher generation per queried row. BLOCKING copies those rows to both participants before returning; NONE returns reconciled rows without writing. All repair writes succeed. The third scenario changes the first read from x alone to x+y.",
  "sourceUrl": "https://raw.githubusercontent.com/apache/cassandra/cassandra-5.0.0/doc/modules/cassandra/pages/managing/operating/read_repair.adoc",
  "humanPage": "https://hesela.com/analyses/replica-repair-coverage/",
  "downloadPath": "/data/datasets/read-repair-traces.csv",
  "codePath": "/research/read-repair-traces.mjs",
  "license": "CC0-1.0 for Hesela's original model code and constructed traces; cited documentation retains its own license.",
  "licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
  "columns": [
    {
      "name": "scenario",
      "type": "string",
      "description": "Independent scenario label; not a sampled population."
    },
    {
      "name": "mode",
      "type": "string",
      "description": "Model rule: BLOCKING writes selected rows to contacted replicas; NONE does not."
    },
    {
      "name": "step",
      "type": "integer",
      "description": "0 initial state, 1 first read, 2 second read; ordering only, not elapsed time."
    },
    {
      "name": "participants",
      "type": "string",
      "description": "Contacted replica names, joined with +; empty at initialization."
    },
    {
      "name": "fields",
      "type": "string",
      "description": "Rows selected within one partition, joined with +; empty at initialization."
    },
    {
      "name": "returnedX",
      "type": "integer|null",
      "description": "Generation returned for row x; null/empty CSV means not read, never zero."
    },
    {
      "name": "returnedY",
      "type": "integer|null",
      "description": "Generation returned for row y; null/empty CSV means not read, never zero."
    },
    {
      "name": "A",
      "type": "string",
      "description": "Replica A state after the step, x/y; 0 is the old generation and 1 the new generation, not an application-value ordering."
    },
    {
      "name": "B",
      "type": "string",
      "description": "Replica B state after the step, x/y; 0 is the old generation and 1 the new generation, not an application-value ordering."
    },
    {
      "name": "C",
      "type": "string",
      "description": "Replica C state after the step, x/y; 0 is the old generation and 1 the new generation, not an application-value ordering."
    }
  ],
  "limits": [
    "Constructed finite traces, not Cassandra execution, measured traffic or reproduction of paper data.",
    "One partition, three full replicas, two ordered generations and two responding replicas per read; no concurrent updates, timestamp ties, expiry, deletion, speculative reads, hints, batch replay or anti-entropy.",
    "Repair writes are assumed successful. Failures, topology, acknowledgements, persistence and latency are not simulated.",
    "The chosen contact schedule is possible, not a frequency estimate or exhaustive proof of implementation behavior.",
    "Changing the first read's scope repairs both rows in this trace only; this does not prove general transaction isolation or recommend a production setting.",
    "Rows are dependent states in three separate scenarios; no statistical confidence interval is applicable."
  ],
  "citations": [
    {
      "id": "read",
      "title": "Apache Cassandra 5.0.0: Read repair; table-level configuration and partition write atomicity",
      "url": "https://raw.githubusercontent.com/apache/cassandra/cassandra-5.0.0/doc/modules/cassandra/pages/managing/operating/read_repair.adoc",
      "accessed": "2026-10-13"
    }
  ],
  "generatedAt": "2026-10-13T02:21:39.965Z",
  "runtime": {
    "node": "v24.21.0",
    "dependencies": "none",
    "seed": "none: deterministic"
  },
  "rows": [
    {
      "scenario": "blocking-x",
      "mode": "BLOCKING",
      "step": 0,
      "participants": "",
      "fields": "",
      "returnedX": null,
      "returnedY": null,
      "A": "1/1",
      "B": "0/0",
      "C": "0/0"
    },
    {
      "scenario": "blocking-x",
      "mode": "BLOCKING",
      "step": 1,
      "participants": "A+B",
      "fields": "x",
      "returnedX": 1,
      "returnedY": null,
      "A": "1/1",
      "B": "1/0",
      "C": "0/0"
    },
    {
      "scenario": "blocking-x",
      "mode": "BLOCKING",
      "step": 2,
      "participants": "B+C",
      "fields": "x+y",
      "returnedX": 1,
      "returnedY": 0,
      "A": "1/1",
      "B": "1/0",
      "C": "1/0"
    },
    {
      "scenario": "none-x",
      "mode": "NONE",
      "step": 0,
      "participants": "",
      "fields": "",
      "returnedX": null,
      "returnedY": null,
      "A": "1/1",
      "B": "0/0",
      "C": "0/0"
    },
    {
      "scenario": "none-x",
      "mode": "NONE",
      "step": 1,
      "participants": "A+B",
      "fields": "x",
      "returnedX": 1,
      "returnedY": null,
      "A": "1/1",
      "B": "0/0",
      "C": "0/0"
    },
    {
      "scenario": "none-x",
      "mode": "NONE",
      "step": 2,
      "participants": "B+C",
      "fields": "x+y",
      "returnedX": 0,
      "returnedY": 0,
      "A": "1/1",
      "B": "0/0",
      "C": "0/0"
    },
    {
      "scenario": "blocking-x-y",
      "mode": "BLOCKING",
      "step": 0,
      "participants": "",
      "fields": "",
      "returnedX": null,
      "returnedY": null,
      "A": "1/1",
      "B": "0/0",
      "C": "0/0"
    },
    {
      "scenario": "blocking-x-y",
      "mode": "BLOCKING",
      "step": 1,
      "participants": "A+B",
      "fields": "x+y",
      "returnedX": 1,
      "returnedY": 1,
      "A": "1/1",
      "B": "1/1",
      "C": "0/0"
    },
    {
      "scenario": "blocking-x-y",
      "mode": "BLOCKING",
      "step": 2,
      "participants": "B+C",
      "fields": "x+y",
      "returnedX": 1,
      "returnedY": 1,
      "A": "1/1",
      "B": "1/1",
      "C": "1/1"
    }
  ],
  "rowCount": 9,
  "artifacts": {
    "codeSha256": "214e1dad0a7f062003d8439db430db4ffdfcf86d2da30a913006b1edbfe3d222",
    "csvSha256": "25f3865ae553c4d3427f66869f1759baa3c74af8547869b583bb705ba8f38bbb"
  }
}
