You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4614ee2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/design/2026-11-25-ticdc-consumer-design.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ The Consumer connects four stages in sequence: `source` -> `decoder group` -> `c
50
50
-**`source`**: Hides data source details; validates sharding consistency when routing rules apply; triggers prompt Cloud Storage file refreshes during `DDL Barrier` waits; and commits consumption progress asynchronously.
51
51
-**`decoder group`**: Decodes normalized payloads concurrently without coupling to source partition layout while preserving per-sequence submission order. Schema-only metadata messages without a `commit-ts` (such as Simple protocol `Bootstrap`) are digested inside `decoder group` to populate the shared schema cache and wake pending DMLs, without forwarding downstream events or entering `DDL Barrier`, while their source offsets still advance normally.
52
52
-**`conductor`**: Aggregates the global Source Watermark $W$ and effective watermark $W_{\text{eff}}$, enforces `DDL Barrier` and `commit-ts` <= $W_{\text{eff}}$ release gating, preserves per-row order under concurrent dispatch, coordinates schema cache GC, and drives `source` commits as $C$ advances.
53
-
-**`writer`**: Filters restart replays, delegates DML batching and asynchronous execution to the downstream DB sink, and advances the Persisted Checkpoint $C$.
53
+
-**`writer`**: Filters duplicate replays, delegates DML batching and asynchronous execution to the downstream DB sink, and advances the Persisted Checkpoint $C$.
54
54
55
55
All supported sources normalize into the same abstraction model, and every downstream event forwarded to `conductor` (`DML`, `DDL`, and `Watermark`) carries a valid `commit-ts` so downstream gating and deduplication operate identically across sources:
56
56
@@ -89,21 +89,21 @@ To confirm external progress safely under concurrent or out-of-order downstream
89
89
-**Unified `commit-ts` <= $W_{\text{eff}}$ gate**: DML events become eligible for downstream dispatch only when `commit-ts` <= $W_{\text{eff}}$, ensuring all partitions or files up to that timestamp have been observed and decoded before row changes execute.
90
90
-**Concurrent execution with row-level order**: Once `commit-ts` <= $W_{\text{eff}}$ holds, `conductor` does not serialize an entire table strictly by `commit-ts`. Instead, it dispatches independent rows and tables concurrently to persist data early, while preserving single-row execution order when related changes arrive across partitions or files.
91
91
-**DDL Barrier readiness**: A DDL statement waits until both conditions hold before execution:
92
-
1.**Watermark readiness**: $W_{\text{eff}} \ge \text{ddl.commit-ts}$, guaranteeing no slower partition or file still holds an earlier or pending-decode DML targeting the affected tables (standalone `CREATE DATABASE` and `CREATE TABLE` statements without source-table dependencies may bypass this wait).
92
+
1.**Watermark readiness**: $W_{\text{eff}} \ge \text{ddl.commit-ts}$, guaranteeing no slower partition or file still holds an earlier or pending-decode DML targeting the affected tables.
93
93
2.**Preceding DML persistence**: All previously dispatched DML events for affected tables finish persisting downstream.
94
94
While a DDL executes, subsequent DML events on affected tables are held back; unrelated tables continue progressing concurrently.
95
95
96
96
---
97
97
98
-
### Schema Lifecycle and Fault-Tolerant Replay
98
+
### Schema Lifecycle and Deduplication
99
99
100
100
-**Shared multi-version schema cache**: Decoders share a versioned `TableInfoProvider` so schema updates from `DDL` and `Bootstrap` messages are visible across all concurrent decoders. As $W_{\text{eff}}$ advances, `conductor` notifies the cache to reclaim expired schema versions below $W_{\text{eff}}$. Before querying historical schemas or parking a DML in the waiting table, decoders skip stale replay events whose `commit-ts` is already covered by the reclaimed watermark, filtering directly on `commit-ts` without requiring table schemas.
101
101
-**Early broadcast DDL deduplication and ordering**: Because sources may broadcast identical DDLs across partitions, every DDL or `Bootstrap` message processed at the `decoder group` boundary follows a strict three-step order:
102
102
1. Decode and update the shared schema cache;
103
103
2. Synchronously wake and decode all pending DMLs waiting on that schema across any partition;
104
104
3. Drop schema-only metadata (`Bootstrap`) and deduplicate broadcast DDLs by DDL identity so the first-arriving partition forwards the DDL to `conductor` while duplicate copies on other partitions are dropped (retaining the DDL's `commit-ts` as each partition's marker so offsets are not acknowledged before the DDL persists).
105
-
-**Fail-fast error handling and at-least-once recovery**: Unrecoverable decoding errors or downstream write failures abort the pipeline immediately without advancing $C$ or committing unpersisted offsets. On restart, `source` replays from the last committed offset.
106
-
-**Three-layer replay deduplication and sink batching**: `writer` passes ready DML events directly to the downstream DB sink for native batching and filters restart replays via three checks:
105
+
-**Fail-fast error handling**: Unrecoverable decoding errors or downstream write failures abort the pipeline immediately without advancing $C$ or committing unpersisted offsets; as a test and verification tool, the Consumer does not support cross-restart recovery.
106
+
-**Three-layer in-process replay deduplication and sink batching**: `writer` passes ready DML events directly to the downstream DB sink for native batching and filters duplicate deliveries (such as MQ redelivery or Storage rescans) via three checks:
107
107
1. Drops events with `commit-ts <= C` as already durable;
108
108
2. Tracks written Handle keys in the `commit-ts > C` window to drop duplicates, reclaiming keys with `commit-ts <= C` once $C$ advances;
109
109
3. Retains an in-memory `(commit-ts, schema, table, query)` set for executed DDLs so non-idempotent DDLs never re-execute across replay windows.
@@ -114,4 +114,4 @@ To confirm external progress safely under concurrent or out-of-order downstream
114
114
115
115
-**Source-agnostic correctness**: Unifying Kafka, Pulsar, and Cloud Storage behind one `commit-ts` <= $W_{\text{eff}}$ gate, `DDL Barrier`, and $C$-driven acknowledgement model eliminates per-source consistency gaps.
116
116
-**High throughput without sacrificing safety**: Concurrent decoding and cross-table/cross-row dispatch avoid single-partition or whole-table bottlenecks while keeping per-row order and `DDL Barrier` invariants intact.
117
-
-**Safe restartability**: Bounding $C$ by downstream persistence callbacks and pairing offset commits with `writer` deduplication provides clean at-least-once replay idempotency.
117
+
-**Safe in-process deduplication**: Bounding $C$ by downstream persistence callbacks and pairing offset commits with `writer` deduplication handles redeliveries and rescans cleanly within a run.
0 commit comments