Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-15503

MongoDBWriter bulk upsert error

    XMLWordPrintable

    Details

    • Branch:
    • QA Testing:
      Graph automated test
    • QA Test Identification:
      MongoDBW_bulk_updateOne_upsert.grf, MongoDBW_bulk_updateMany_upsert.grf, MongoDBW_bulk_replaceOne_upsert.grf
    • Steps to reproduce:
      Hide

      Run graph mongo4issue1.grf.

      The graph returns an error, but a document was inserted (wrong structure though, the query was used as a subdocument in new upserted doc)

      When running graph again after first failure, no error is returned anymore.

      Note - cannot be fixed by using latest MongoDB java driver

      Show
      Run graph mongo4issue1.grf . The graph returns an error, but a document was inserted (wrong structure though, the query was used as a subdocument in new upserted doc) When running graph again after first failure, no error is returned anymore. Note - cannot be fixed by using latest MongoDB java driver
    • Epic Link:
    • Sprint:
      Blue Sprint 75, Blue Sprint 76

      Description

      MongoDBWriter - updateOne, upsert function does not work in MongoDB 4 version.

      org.jetel.exception.JetelRuntimeException: Component [update values by replacing documents:UPDATE_VALUES_BY_REPLACING_DOCUMENTS] finished with status ERROR. (In0: 1 recs)
      	at org.jetel.graph.Node.createNodeException(Node.java:652)
      	at org.jetel.graph.Node.run(Node.java:619)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
      	at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: org.jetel.exception.JetelRuntimeException: Execution failed
      	at com.opensys.cloveretl.component.MongoDBWriter$AbstractOperationStrategy.processFailure(MongoDBWriter.java:643)
      	at com.opensys.cloveretl.component.MongoDBWriter$BulkWriteStrategy.execute(MongoDBWriter.java:1018)
      	at com.opensys.cloveretl.component.MongoDBWriter.execute(MongoDBWriter.java:269)
      	at org.jetel.graph.Node.run(Node.java:579)
      	... 3 more
      Caused by: org.jetel.exception.JetelRuntimeException: Batch execution failed
      	at com.opensys.cloveretl.component.MongoDBWriter$BulkWriteStrategy.processBatchFailure(MongoDBWriter.java:964)
      	at com.opensys.cloveretl.component.MongoDBWriter$BulkWriteStrategy.executeBulkWrite(MongoDBWriter.java:894)
      	at com.opensys.cloveretl.component.MongoDBWriter$BulkWriteStrategy.finish(MongoDBWriter.java:860)
      	at com.opensys.cloveretl.component.MongoDBWriter$BulkWriteStrategy.execute(MongoDBWriter.java:1015)
      	... 5 more
      Caused by: java.lang.RuntimeException: json can't serialize type : class org.bson.BsonObjectId
      	at com.mongodb.util.ClassMapBasedObjectSerializer.serialize(ClassMapBasedObjectSerializer.java:77)
      	at com.mongodb.util.AbstractObjectSerializer.serialize(AbstractObjectSerializer.java:24)
      	at com.opensys.cloveretl.connection.nosql.mongo3.MongoClientImpl_3_0.serializeStrict(MongoClientImpl_3_0.java:747)
      	at com.opensys.cloveretl.connection.nosql.mongo3.MongoClientImpl_3_0.jsonSerialize(MongoClientImpl_3_0.java:756)
      	at com.opensys.cloveretl.connection.nosql.mongo3.MongoClientImpl_3_0.toString(MongoClientImpl_3_0.java:728)
      	at com.opensys.cloveretl.connection.nosql.mongo3.BulkResultImpl$IteratorImpl.getObjectId(BulkResultImpl.java:193)
      	at com.opensys.cloveretl.connection.nosql.mongo3.BulkResultImpl$IteratorImpl.next(BulkResultImpl.java:168)
      	at com.opensys.cloveretl.connection.nosql.mongo3.BulkResultImpl$IteratorImpl.next(BulkResultImpl.java:126)
      	at com.opensys.cloveretl.component.MongoDBWriter$BulkWriteStrategy.executeBulkWrite(MongoDBWriter.java:880)
      	... 7 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                krivanekm Milan Krivanek
                Reporter:
                sporekj Jan Sporek
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d