You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "yzeng1618 (via GitHub)" <gi...@apache.org> on 2025/06/03 02:47:17 UTC

Re: [PR] [FLINK-34864][cdc-connector-mysql] Add the IgnoreNoPrimaryKeyTable parameter to skip tables without primary keys in multi-table synchronization [flink-cdc]

yzeng1618 commented on code in PR #4027:
URL: https://github.com/apache/flink-cdc/pull/4027#discussion_r2122512367


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/config/MySqlSourceOptions.java:
##########
@@ -293,4 +293,15 @@ public class MySqlSourceOptions {
                     .defaultValue(false)
                     .withDescription(
                             "Whether to assign the unbounded chunks first during snapshot reading phase. This might help reduce the risk of the TaskManager experiencing an out-of-memory (OOM) error when taking a snapshot of the largest unbounded chunk. Defaults to false.");
+
+    @Experimental
+    public static final ConfigOption<Boolean> IGNORE_NO_PRIMARY_KEY_TABLE =
+            ConfigOptions.key("ignore-no-primary-key-table")
+                    .booleanType()
+                    .defaultValue(false)
+                    .withDescription(
+                            "Whether to ignore tables without primary key. When enabled, the connector will skip tables "
+                                    + "that don't have a primary key. By default these tables will be processed, but for some "
+                                    + "scenarios it may be desirable to ignore them since tables without primary keys "
+                                    + "might cause performance issues during incremental snapshot.");

Review Comment:
   The code logic content has been newly added and verified through testing.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org