{
  "schemaVersion": 1,
  "evidenceType": "measured-synthetic-workload",
  "generatedAt": "2026-10-16T02:07:30.246278+00:00",
  "scriptSha256": "df70b669acf3400b95be0a4552d917e0db23724ebe06ee76ba43c51cdd33c7b1",
  "environment": {
    "sqlite": "3.45.1",
    "sqliteSourceId": "2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1",
    "sqliteCompileOptions": [
      "ATOMIC_INTRINSICS=1",
      "COMPILER=gcc-13.3.0",
      "DEFAULT_AUTOVACUUM",
      "DEFAULT_CACHE_SIZE=-2000",
      "DEFAULT_FILE_FORMAT=4",
      "DEFAULT_JOURNAL_SIZE_LIMIT=-1",
      "DEFAULT_MMAP_SIZE=0",
      "DEFAULT_PAGE_SIZE=4096",
      "DEFAULT_PCACHE_INITSZ=20",
      "DEFAULT_RECURSIVE_TRIGGERS",
      "DEFAULT_SECTOR_SIZE=4096",
      "DEFAULT_SYNCHRONOUS=2",
      "DEFAULT_WAL_AUTOCHECKPOINT=1000",
      "DEFAULT_WAL_SYNCHRONOUS=2",
      "DEFAULT_WORKER_THREADS=0",
      "DIRECT_OVERFLOW_READ",
      "ENABLE_COLUMN_METADATA",
      "ENABLE_DBSTAT_VTAB",
      "ENABLE_FTS3",
      "ENABLE_FTS3_PARENTHESIS",
      "ENABLE_FTS3_TOKENIZER",
      "ENABLE_FTS4",
      "ENABLE_FTS5",
      "ENABLE_LOAD_EXTENSION",
      "ENABLE_MATH_FUNCTIONS",
      "ENABLE_PREUPDATE_HOOK",
      "ENABLE_RTREE",
      "ENABLE_SESSION",
      "ENABLE_STMTVTAB",
      "ENABLE_UNLOCK_NOTIFY",
      "ENABLE_UPDATE_DELETE_LIMIT",
      "HAVE_ISNAN",
      "LIKE_DOESNT_MATCH_BLOBS",
      "MALLOC_SOFT_LIMIT=1024",
      "MAX_ATTACHED=10",
      "MAX_COLUMN=2000",
      "MAX_COMPOUND_SELECT=500",
      "MAX_DEFAULT_PAGE_SIZE=32768",
      "MAX_EXPR_DEPTH=1000",
      "MAX_FUNCTION_ARG=127",
      "MAX_LENGTH=1000000000",
      "MAX_LIKE_PATTERN_LENGTH=50000",
      "MAX_MMAP_SIZE=0x7fff0000",
      "MAX_PAGE_COUNT=0xfffffffe",
      "MAX_PAGE_SIZE=65536",
      "MAX_SCHEMA_RETRY=25",
      "MAX_SQL_LENGTH=1000000000",
      "MAX_TRIGGER_DEPTH=1000",
      "MAX_VARIABLE_NUMBER=250000",
      "MAX_VDBE_OP=250000000",
      "MAX_WORKER_THREADS=8",
      "MUTEX_PTHREADS",
      "SECURE_DELETE",
      "SOUNDEX",
      "SYSTEM_MALLOC",
      "TEMP_STORE=1",
      "THREADSAFE=1",
      "USE_URI"
    ],
    "python": "3.12.3",
    "os": "Linux",
    "kernel": "6.8.0-146-generic"
  },
  "workload": {
    "rows": 2,
    "connections": 2,
    "randomness": "none",
    "schedule": "Sequential API calls, overlapping transaction lifetimes",
    "staleTimeoutsMs": [
      0,
      250
    ],
    "staleChangedRows": [
      1,
      2
    ]
  },
  "caseCount": 6,
  "cases": [
    {
      "case": "stale-snapshot-0-1",
      "kind": "stale-snapshot",
      "settings": {
        "journal_mode": "wal",
        "synchronous": 2,
        "wal_autocheckpoint": 0,
        "busy_timeout": 0,
        "read_uncommitted": 0
      },
      "changedRow": 1,
      "initialRead": [
        [
          1,
          0
        ]
      ],
      "writerCommittedBeforeUpgrade": true,
      "writerRows": [
        [
          1,
          1
        ],
        [
          2,
          0
        ]
      ],
      "attempts": [
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        },
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        }
      ],
      "retainedRows": [
        [
          1,
          0
        ],
        [
          2,
          0
        ]
      ],
      "freshRows": [
        [
          1,
          1
        ],
        [
          2,
          0
        ]
      ],
      "finalRows": [
        [
          1,
          11
        ],
        [
          2,
          0
        ]
      ],
      "integrityCheck": "ok"
    },
    {
      "case": "stale-snapshot-0-2",
      "kind": "stale-snapshot",
      "settings": {
        "journal_mode": "wal",
        "synchronous": 2,
        "wal_autocheckpoint": 0,
        "busy_timeout": 0,
        "read_uncommitted": 0
      },
      "changedRow": 2,
      "initialRead": [
        [
          1,
          0
        ]
      ],
      "writerCommittedBeforeUpgrade": true,
      "writerRows": [
        [
          1,
          0
        ],
        [
          2,
          1
        ]
      ],
      "attempts": [
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        },
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        }
      ],
      "retainedRows": [
        [
          1,
          0
        ],
        [
          2,
          0
        ]
      ],
      "freshRows": [
        [
          1,
          0
        ],
        [
          2,
          1
        ]
      ],
      "finalRows": [
        [
          1,
          10
        ],
        [
          2,
          1
        ]
      ],
      "integrityCheck": "ok"
    },
    {
      "case": "stale-snapshot-250-1",
      "kind": "stale-snapshot",
      "settings": {
        "journal_mode": "wal",
        "synchronous": 2,
        "wal_autocheckpoint": 0,
        "busy_timeout": 250,
        "read_uncommitted": 0
      },
      "changedRow": 1,
      "initialRead": [
        [
          1,
          0
        ]
      ],
      "writerCommittedBeforeUpgrade": true,
      "writerRows": [
        [
          1,
          1
        ],
        [
          2,
          0
        ]
      ],
      "attempts": [
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        },
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        }
      ],
      "retainedRows": [
        [
          1,
          0
        ],
        [
          2,
          0
        ]
      ],
      "freshRows": [
        [
          1,
          1
        ],
        [
          2,
          0
        ]
      ],
      "finalRows": [
        [
          1,
          11
        ],
        [
          2,
          0
        ]
      ],
      "integrityCheck": "ok"
    },
    {
      "case": "stale-snapshot-250-2",
      "kind": "stale-snapshot",
      "settings": {
        "journal_mode": "wal",
        "synchronous": 2,
        "wal_autocheckpoint": 0,
        "busy_timeout": 250,
        "read_uncommitted": 0
      },
      "changedRow": 2,
      "initialRead": [
        [
          1,
          0
        ]
      ],
      "writerCommittedBeforeUpgrade": true,
      "writerRows": [
        [
          1,
          0
        ],
        [
          2,
          1
        ]
      ],
      "attempts": [
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        },
        {
          "code": 517,
          "name": "SQLITE_BUSY_SNAPSHOT",
          "primaryCode": 5,
          "transactionActive": true
        }
      ],
      "retainedRows": [
        [
          1,
          0
        ],
        [
          2,
          0
        ]
      ],
      "freshRows": [
        [
          1,
          0
        ],
        [
          2,
          1
        ]
      ],
      "finalRows": [
        [
          1,
          10
        ],
        [
          2,
          1
        ]
      ],
      "integrityCheck": "ok"
    },
    {
      "case": "deferred-before-read-0-1",
      "kind": "deferred-before-read",
      "settings": {
        "journal_mode": "wal",
        "synchronous": 2,
        "wal_autocheckpoint": 0,
        "busy_timeout": 0,
        "read_uncommitted": 0
      },
      "changedRow": 1,
      "firstRead": [
        [
          1,
          1
        ],
        [
          2,
          0
        ]
      ],
      "finalRows": [
        [
          1,
          11
        ],
        [
          2,
          0
        ]
      ],
      "integrityCheck": "ok"
    },
    {
      "case": "immediate-writer-0-1",
      "kind": "immediate-writer",
      "settings": {
        "journal_mode": "wal",
        "synchronous": 2,
        "wal_autocheckpoint": 0,
        "busy_timeout": 0,
        "read_uncommitted": 0
      },
      "changedRow": 1,
      "competingWriter": {
        "code": 5,
        "name": "SQLITE_BUSY",
        "primaryCode": 5,
        "transactionActive": false
      },
      "readerDuringWriter": [
        [
          1,
          0
        ],
        [
          2,
          0
        ]
      ],
      "finalRows": [
        [
          1,
          11
        ],
        [
          2,
          0
        ]
      ],
      "integrityCheck": "ok"
    }
  ],
  "limits": [
    "Constructed schedules, not a production frequency estimate or performance benchmark.",
    "No simultaneous API calls, crashes, power losses or I/O faults.",
    "No shared-cache or read_uncommitted configurations are tested.",
    "No claim that BEGIN IMMEDIATE improves throughput; it occupies the writer position earlier.",
    "Installed SQLite is recorded, not a production patch recommendation.",
    "No timing threshold or busy-handler invocation count is measured."
  ],
  "sources": [
    "https://www.sqlite.org/isolation.html",
    "https://www.sqlite.org/rescode.html#busy_snapshot",
    "https://www.sqlite.org/lang_transaction.html"
  ]
}
