v0.3.3 recovery and checkpoint validation¶
Recovery results are scoped to the recorded fixture versions and modes. The machine-readable scenario reports distinguish an automatic resume from an explicit API/task restart. A manual restart is never counted as automatic recovery.
Runtime fixes¶
The staged engine previously recovered only APPLIED batches before polling Kafka. A process dying in CREATED/STAGING/STAGED/APPLYING could leave a pending ledger row behind when the next poll had different boundaries. Recovery now selects the oldest pending batch first, preserves its identity and manifest, and reads exactly the original Kafka range when restaging is necessary. New batches persist their record count before uploading. Missing range boundaries, expired retention and incomplete record counts block checkpointing. An APPLIED batch without its destination marker remains APPLIED with an actionable error, rather than raising an invalid state-transition error or accepting new work.
Synapse delegates this state machine to the existing shared staged engine while
retaining its original cluecdc-synapse-DELIVERY_ID consumer group. Redshift retains
its original group. No new offset/checkpoint authority, migration, topic deletion
or offset reset was introduced. Old APPLIED and durable staged manifests remain
recoverable. Legacy unstaged pending batches without a persisted count require
explicit operator reconciliation; the engine cannot prove their original record
count after a crash. It does not guess or silently advance their checkpoints.
Fault tests cover upload failure, process death after upload, process death after the simulated destination transaction, changed poll boundaries, apply retry, missing destination marker, commit failure, expired Kafka range and preservation across a new SQLAlchemy session. These are unit/local-metadata tests with real SQLite persistence and mocked Kafka/cloud boundaries, not cloud E2E evidence. Real Redshift/Synapse transaction, storage and deduplication behavior remains NOT RUN without dedicated cloud infrastructure.
The expired-WAL fixture exposed a separate monitoring defect. PostgreSQL can mark
an existing slot lost while Debezium keeps retrying and reports RUNNING or an
unassigned task. Reconciliation now reads the exact configured slot from
pg_replication_slots. A definitive lost slot projects the existing FAILED state
and SOURCE_RECOVERY_REQUIRED, records an actionable error, preserves actual
Connect observations and desired state, and never resets a source position.
Unavailable slot observations remain Unavailable; another pipeline's lost slot
does not determine this pipeline's health. Paused/stopped pipelines are respected.
The real fixture verifies that invalidated WAL yields this diagnostic while both
saved offsets and connector configuration stay equal to their previous values.
Source trace classification also separates transient connectivity, authentication and unavailable PostgreSQL/MySQL history. Source auto-restart policy was not expanded. Source-position recovery remains an explicit operator decision.
Live SQL Server validation exposed missing native dependencies in the slim API
image. Importing mssql_python did not load its ODBC companion; first connection
failed. The image now installs libltdl7, libkrb5-3 and libgssapi-krb5-2, and
loads the native driver during build. These are the documented
Microsoft Linux prerequisites.
No TLS validation setting was relaxed. This packaging fix also applies to the
existing Synapse SQL driver; it does not establish Azure cloud connectivity.
Live scenario definitions¶
| Failure | Initial state and injection | Recovery/assertion | Bound |
|---|---|---|---|
| Source outage, twice | Active pipeline, durable saved source offsets; stop/start only the labeled fixture source | Restore actual database readiness, observe task state, use existing explicit restart only if needed; verify subsequent records and retained configuration | 180 s per recovery poll |
| Connect worker restart | Active pipeline; stop/start owned worker, retaining internal topics | Events written while down and after recovery reach delivery; connector inventory/configuration remain equal | 180 s per recovery poll |
| Kafka outage | Owned single-broker fixture only; write source data while Kafka is down | Restore broker readiness; verify queued changes and later markers, positions and delivery | 180 s per recovery poll |
| Destination outage | Owned ClickHouse/MinIO endpoint interrupted while source remains available | Capture continues in Kafka; pending and subsequent changes arrive after restoration | 180 s per recovery poll |
| API and worker restart | Connect remains active; restart owned API/worker separately | Metadata/session state survives, existing connector inventory and configuration remain equal; continued delivery | 180 s per recovery poll |
| Interrupted initial snapshot | PostgreSQL snapshot observed in progress; insert/update concurrently and explicitly restart capture | Exact seeded/concurrent row digest at JDBC destination and subsequent streaming marker; no cross-source resume claim | 300 s settle |
| Expired WAL | Desired pause, stop owned Connect task, cap WAL retention and generate disposable WAL | Lost slot produces recovery-required diagnostic; offsets/configuration stay unchanged; no resnapshot or slot reset | Four bounded WAL-generation cycles; 120 s diagnostic poll |
| Ordered replay and sink restart | Republish original envelopes only to the owned topic, preserving partition ordering | JDBC settles to equal state; history retains logical repeats and measures coordinate duplicates | 180 s per verification poll |
Docker readiness is checked after restoration; an open forwarded socket is not sufficient database readiness. Connect REST availability is bounded separately from data delivery. Failed assertions collect sanitized diagnostics before fixture shutdown. Default test checkpoint cadence is one second, confined to the new project; existing deployment settings are unchanged.
Executed recovery results¶
The final selected evidence contains 42 individually recorded short outages: 40 across the six primary PostgreSQL/MySQL pairs and two SQL Server outages. All 42 recovered without a test-issued connector/task restart after the owned service was restored. In addition, the MariaDB and MongoDB parent results contain two source outages each, four operator-assisted recoveries using the existing task restart. MariaDB's same two faults validate both its MinIO and PostgreSQL outputs and are counted once. Total: 46 executed service-outage injections. The separate API lifecycle tests deliberately pause/resume/restart, and the interrupted-snapshot test explicitly restarts capture; those are not automatic outage recovery results.
The PostgreSQL interrupted-snapshot run first observed actual snapshot events in
progress, then inserted/updated concurrent source rows and restarted capture.
It verified a 50,001-row key/value digest and a subsequent streaming marker.
The separate expired-WAL run forced only the owned slot into lost, verified
nonretryable SOURCE_RECOVERY_REQUIRED, and compared offsets/configuration
before and after: both were unchanged. No position reset or automatic resnapshot
was performed.
After the primary fault runs, all-column current-state comparison passed for ten rows per JDBC pair. MinIO's event-value multisets matched Kafka (20 PostgreSQL, 21 MySQL events; no additional delivery occurrences). Both ClickHouse pairs had 20 rows, 20 distinct coordinates and zero observed coordinate duplicates. Deliberate logical replay remains present. These are measured observations, not an exactly-once or indefinite-retention guarantee.
Evidence resides in artifacts/cdc-reliability/recovery-tests.json,
checkpoint-tests.json, data-correctness.json and their per-scenario inputs.
The E2E report records the exact final input directories.
Limits and operator recovery¶
There is no exactly-once claim. JDBC ordered replay checks do not certify arbitrary out-of-order old updates. ClickHouse remains at-least-once history; duplicates are measured, and physical Kafka coordinates differ for intentionally republished events. A destination marker is a provider-specific deduplication contract, not a generic guarantee across all sinks.
For JDBC fixtures the source and destination databases share the same physical test server. Their database outages therefore exercise combined capture/delivery failure. Independent capture during a JDBC-only destination outage remains unverified; the independent destination-outage assertion is established for MinIO and ClickHouse. The single-broker fixture does not establish Kafka HA.
PostgreSQL WAL expiration is tested explicitly. Missing MySQL/MariaDB binlogs, MongoDB oplog/resume history, SQL Server capture history and Oracle redo expiration remain classified/guarded but not independently reproduced in live expiration tests. Interrupted initial snapshot behavior for other sources, multi-broker loss, failover, retention exhaustion during a prolonged outage, schema-change outages and long-duration operation remain unverified. Short recovery does not prove safety after the retained source history is gone.
For an unusable source position, preserve the error/offset evidence, restore retained history where possible, and plan explicit resnapshot plus destination reconciliation where necessary. Do not delete offsets, slots, history topics or checkpoints merely to clear the error. Any destructive operator recovery stays outside this test milestone.
Exact executed counts, per-pair status and remaining gaps appear in the compatibility report and generated JSON artifacts.