herunkang2018 commented on code in PR #3704:
URL: https://github.com/apache/flink-cdc/pull/3704#discussion_r1864686042


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/main/java/org/apache/flink/cdc/connectors/mongodb/source/assigners/splitters/MongoDBChunkSplitter.java:
##########
@@ -38,10 +40,15 @@ public MongoDBChunkSplitter(MongoDBSourceConfig 
sourceConfig) {
 
     @Override
     public Collection<SnapshotSplit> generateSplits(TableId collectionId) {
+        ArrayList<SnapshotSplit> snapshotSplits = new ArrayList<>();
         SplitContext splitContext = SplitContext.of(sourceConfig, 
collectionId);
         if (splitContext.isShardedCollection()) {
-            return ShardedSplitStrategy.INSTANCE.split(splitContext);
+            
snapshotSplits.addAll(ShardedSplitStrategy.INSTANCE.split(splitContext));
         }
-        return SplitVectorSplitStrategy.INSTANCE.split(splitContext);
+        
snapshotSplits.addAll(SplitVectorSplitStrategy.INSTANCE.split(splitContext));

Review Comment:
   Seems it will split repeatly here.



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to