gong commented on code in PR #8044:
URL: https://github.com/apache/inlong/pull/8044#discussion_r1209672869


##########
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/source/assigners/MySqlSnapshotSplitAssigner.java:
##########
@@ -397,6 +397,14 @@ private void closeExecutorService() {
         }
     }
 
+    private void addNewlyAddedSplits(List<MySqlSchemalessSnapshotSplit> 
schemaLessSnapshotSplits) {
+        int size = schemaLessSnapshotSplits.size();
+        // move the last snapshot split to the front of the remaining splits 
to prevent OOM
+        // caused by the excessive data of the last snapshot split.
+        remainingSplits.add(0, schemaLessSnapshotSplits.get(size - 1));
+        remainingSplits.addAll(schemaLessSnapshotSplits.subList(0, size - 1));

Review Comment:
   `remainSplits` is all splits, `remainingSplits.add(0, 
schemaLessSnapshotSplits.get(size - 1));` will cause other table split lost



-- 
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]

Reply via email to