You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/07/23 03:36:09 UTC

[GitHub] [beam] aaltay commented on a change in pull request #14927: [BEAM-12400] MongoDBIO support for update within documents

aaltay commented on a change in pull request #14927:
URL: https://github.com/apache/beam/pull/14927#discussion_r675288003



##########
File path: sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
##########
@@ -910,15 +973,24 @@ public void startBundle() {
       public void processElement(ProcessContext ctx) {
         // Need to copy the document because mongoCollection.insertMany() will mutate it
         // before inserting (will assign an id).
+
         batch.add(new Document(ctx.element()));
         if (batch.size() >= spec.batchSize()) {
-          flush();
+          if (spec.isUpdate()) {

Review comment:
       (Pablo is on vacation until August, please ping again in early August.)




-- 
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: github-unsubscribe@beam.apache.org

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