herunkang2018 commented on code in PR #3707:
URL: https://github.com/apache/flink-cdc/pull/3707#discussion_r2020068024
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/main/java/org/apache/flink/cdc/connectors/mongodb/table/MongoDBTableSourceFactory.java:
##########
@@ -103,6 +109,18 @@ public DynamicTableSource createDynamicTableSource(Context
context) {
: ZoneId.of(zoneId);
boolean enableParallelRead =
config.get(SCAN_INCREMENTAL_SNAPSHOT_ENABLED);
+
+ // The initial.snapshotting.pipeline config is only used in Debezium
mode and
+ // cannot be used in incremental snapshot mode because the semantic is
inconsistent.
+ // The reason is that in snapshot phase of incremental snapshot mode,
the oplog
+ // will be backfilled after each snapshot to compensate for changes,
but the pipeline
+ // operations in initial.snapshotting.pipeline are not applied to the
backfill oplog,
+ // which means the semantic of this config is inconsistent.
+ checkArgument(
+ !(enableParallelRead && initialSnapshottingPipeline != null),
Review Comment:
Yes, I think we should check it to avoid misuse, I will fix it soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]