vinlee19 commented on code in PR #439: URL: https://github.com/apache/doris-flink-connector/pull/439#discussion_r1689052381
########## flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/DatabaseSync.java: ########## @@ -128,13 +129,7 @@ public void build() throws Exception { } List<String> syncTables = new ArrayList<>(); List<Tuple2<String, String>> dorisTables = new ArrayList<>(); - Map<String, Integer> tableBucketsMap = null; - if (tableConfig.containsKey("table-buckets")) { - tableBucketsMap = getTableBuckets(tableConfig.get("table-buckets")); - } - // Set of table names that have assigned bucket numbers. - Set<String> tablesWithBucketsAssigned = new HashSet<>(); Review Comment: "tablesWithBucketsAssigned" is designed to reduce the repeated traversal of tables that have already been assigned buckets when using regular expression matching. For example, if there are 100 tables in the upstream source, and the `table-buckets` regular expression is as follows: a1.*:1, a2.*:2... a10.*. If we do not add the table to the `tablesWithBucketsAssigned` Set, we will repeatedly traverse the `tableBucketsMap`. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org