Miuler commented on code in PR #17511:
URL: https://github.com/apache/beam/pull/17511#discussion_r878220690


##########
sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java:
##########
@@ -489,8 +490,16 @@ public List<BoundedSource<Document>> split(
             // maxChunkSize is the Mongo partition size in MB
             LOG.debug("Splitting in chunk of {} MB", desiredBundleSizeBytes / 
1024 / 1024);
             splitVectorCommand.append("maxChunkSize", desiredBundleSizeBytes / 
1024 / 1024);
-            Document splitVectorCommandResult = 
mongoDatabase.runCommand(splitVectorCommand);
-            splitKeys = (List<Document>) 
splitVectorCommandResult.get("splitKeys");
+            try {

Review Comment:
   > there should be a test case where we mock in the 115 exception, and verify 
the return of just the singleton list.
   I already added it, you can check it
   
   > In the log where we say the command isn't supported, we should say why it 
isn't supported.
   I can't find a way to simulate this, can you help me?



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