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


##########
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:
   > Can we add a test case for this?
   
   How would it be? cosmosdb is a SAAS service, what do you advise?
   
   > Also, can we add documentation to the log, so if a user sees this, they 
have context for why their command isn't supported?
   
   mmm... in what log? in the CHANGES.md?
   
   
   > Finally, should we universally not-fail on a 115 here, or are there 
potential cases where a "command not supported" exception would still be an 
exception?
   
   This is product of the `splitVector` command into the try catch, no other 
command is executed 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to