Skip to content

Commit 7a57f55

Browse files
authored
[FLINK-37128][cdc-connector-mysql] Binlog reader skip shouldEmit filter when snapshot reader skip backfill (#3874)
1 parent ceffbc0 commit 7a57f55

File tree

17 files changed

+320
-7
lines changed

17 files changed

+320
-7
lines changed

docs/content.zh/docs/connectors/flink-sources/mongodb-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,18 @@ MongoDB 的更改事件记录在消息之前没有更新。因此,我们只能
336336
这是一项实验特性,默认为 false。
337337
</td>
338338
</tr>
339+
<tr>
340+
<td>scan.incremental.snapshot.backfill.skip</td>
341+
<td>optional</td>
342+
<td style="word-wrap: break-word;">false</td>
343+
<td>Boolean</td>
344+
<td>
345+
Whether to skip backfill in snapshot reading phase.<br>
346+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
347+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
348+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
349+
</td>
350+
</tr>
339351
</tbody>
340352
</table>
341353
</div>

docs/content.zh/docs/connectors/flink-sources/mysql-cdc.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,17 @@ Flink SQL> SELECT * FROM orders;
413413
<li>false(默认):所有类型的消息都保持原样下发。</li>
414414
</td>
415415
</tr>
416+
<tr>
417+
<td>scan.incremental.snapshot.backfill.skip</td>
418+
<td>optional</td>
419+
<td style="word-wrap: break-word;">false</td>
420+
<td>Boolean</td>
421+
<td>
422+
是否在快照读取阶段跳过 backfill 。<br>
423+
如果跳过 backfill ,快照阶段捕获表的更改将在稍后的 binlog 读取阶段被回放,而不是合并到快照中。<br>
424+
警告:跳过 backfill 可能会导致数据不一致,因为快照阶段发生的某些 binlog 事件可能会被重放(仅保证 at-least-once )。
425+
例如,更新快照阶段已更新的值,或删除快照阶段已删除的数据。这些重放的 binlog 事件应进行特殊处理。
426+
</tr>
416427
</tbody>
417428
</table>
418429
</div>

docs/content.zh/docs/connectors/flink-sources/oracle-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,18 @@ Connector Options
433433
Experimental option, defaults to false.
434434
</td>
435435
</tr>
436+
<tr>
437+
<td>scan.incremental.snapshot.backfill.skip</td>
438+
<td>optional</td>
439+
<td style="word-wrap: break-word;">false</td>
440+
<td>Boolean</td>
441+
<td>
442+
Whether to skip backfill in snapshot reading phase.<br>
443+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
444+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
445+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
446+
</td>
447+
</tr>
436448
</tbody>
437449
</table>
438450
</div>

docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ Connector Options
256256
Experimental option, defaults to false.
257257
</td>
258258
</tr>
259+
<tr>
260+
<td>scan.incremental.snapshot.backfill.skip</td>
261+
<td>optional</td>
262+
<td style="word-wrap: break-word;">false</td>
263+
<td>Boolean</td>
264+
<td>
265+
Whether to skip backfill in snapshot reading phase.<br>
266+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
267+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
268+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
269+
</td>
270+
</tr>
259271
</tbody>
260272
</table>
261273
</div>

docs/content.zh/docs/connectors/flink-sources/sqlserver-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,18 @@ Connector Options
249249
Experimental option, defaults to false.
250250
</td>
251251
</tr>
252+
<tr>
253+
<td>scan.incremental.snapshot.backfill.skip</td>
254+
<td>optional</td>
255+
<td style="word-wrap: break-word;">false</td>
256+
<td>Boolean</td>
257+
<td>
258+
Whether to skip backfill in snapshot reading phase.<br>
259+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
260+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
261+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
262+
</td>
263+
</tr>
252264
</tbody>
253265
</table>
254266
</div>

docs/content.zh/docs/connectors/pipeline-connectors/mysql.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,17 @@ pipeline:
323323
这是一项实验特性,默认为 false。
324324
</td>
325325
</tr>
326+
<tr>
327+
<td>scan.incremental.snapshot.backfill.skip</td>
328+
<td>optional</td>
329+
<td style="word-wrap: break-word;">false</td>
330+
<td>Boolean</td>
331+
<td>
332+
是否在快照读取阶段跳过 backfill 。<br>
333+
如果跳过 backfill ,快照阶段捕获表的更改将在稍后的 binlog 读取阶段被回放,而不是合并到快照中。<br>
334+
警告:跳过 backfill 可能会导致数据不一致,因为快照阶段发生的某些 binlog 事件可能会被重放(仅保证 at-least-once )。
335+
例如,更新快照阶段已更新的值,或删除快照阶段已删除的数据。这些重放的 binlog 事件应进行特殊处理。
336+
</tr>
326337
<tr>
327338
<td>metadata.list</td>
328339
<td>optional</td>

docs/content/docs/connectors/flink-sources/mongodb-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,18 @@ Connector Options
361361
Experimental option, defaults to false.
362362
</td>
363363
</tr>
364+
<tr>
365+
<td>scan.incremental.snapshot.backfill.skip</td>
366+
<td>optional</td>
367+
<td style="word-wrap: break-word;">false</td>
368+
<td>Boolean</td>
369+
<td>
370+
Whether to skip backfill in snapshot reading phase.<br>
371+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
372+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
373+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
374+
</td>
375+
</tr>
364376
</tbody>
365377
</table>
366378
</div>

docs/content/docs/connectors/flink-sources/mysql-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,18 @@ During a snapshot operation, the connector will query each included table to pro
439439
<li>false (default): All types of messages are sent as is.</li>
440440
</td>
441441
</tr>
442+
<tr>
443+
<td>scan.incremental.snapshot.backfill.skip</td>
444+
<td>optional</td>
445+
<td style="word-wrap: break-word;">false</td>
446+
<td>Boolean</td>
447+
<td>
448+
Whether to skip backfill in snapshot reading phase.<br>
449+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
450+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
451+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
452+
</td>
453+
</tr>
442454
</tbody>
443455
</table>
444456
</div>

docs/content/docs/connectors/flink-sources/oracle-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,18 @@ Connector Options
434434
Experimental option, defaults to false.
435435
</td>
436436
</tr>
437+
<tr>
438+
<td>scan.incremental.snapshot.backfill.skip</td>
439+
<td>optional</td>
440+
<td style="word-wrap: break-word;">false</td>
441+
<td>Boolean</td>
442+
<td>
443+
Whether to skip backfill in snapshot reading phase.<br>
444+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
445+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
446+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
447+
</td>
448+
</tr>
437449
</tbody>
438450
</table>
439451
</div>

docs/content/docs/connectors/flink-sources/postgres-cdc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ SELECT * FROM shipments;
253253
Experimental option, defaults to false.
254254
</td>
255255
</tr>
256+
<tr>
257+
<td>scan.incremental.snapshot.backfill.skip</td>
258+
<td>optional</td>
259+
<td style="word-wrap: break-word;">false</td>
260+
<td>Boolean</td>
261+
<td>
262+
Whether to skip backfill in snapshot reading phase.<br>
263+
If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in change log reading phase instead of being merged into the snapshot.<br>
264+
WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised).
265+
For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.
266+
</td>
267+
</tr>
256268
</tbody>
257269
</table>
258270
</div>

0 commit comments

Comments
 (0)