Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-22218

Push opeartion failed if push and upsert for same document were built into same BulkOperation execution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:
      MongoDB 3.0.5
      C++ driver: 1.0.1
      OS: centos 7
    • Operating System:
      Linux
    • Steps To Reproduce:
      Hide

      BulkOperationBuilder p_builder
      p_builder.find(queryObj).upsert().updateOne(BSON("$set"<<bsonObj_1));
      p_builder.find(queryObj).update(BSON("$push"<<bsonObj_2));

      p_builder.execute()

      If both query hit same document, the push operation didn't create the array correctly.

      If move push operation away from bulkOperationBuilder and run it in the non-bulk mode, the array field was created correctly.
      Moreover, even push operation failed in the bulkOpeation mode, there is no exception raised for the bulkOperation.execute().

      Show
      BulkOperationBuilder p_builder p_builder.find(queryObj).upsert().updateOne(BSON("$set"<<bsonObj_1)); p_builder.find(queryObj).update(BSON("$push"<<bsonObj_2)); p_builder.execute() If both query hit same document, the push operation didn't create the array correctly. If move push operation away from bulkOperationBuilder and run it in the non-bulk mode, the array field was created correctly. Moreover, even push operation failed in the bulkOpeation mode, there is no exception raised for the bulkOperation.execute().

      Description

      Two separated opeartion: push and upsert were built in same BulkOperation.
      if two operation will operate on same document, it will cause the push operation failed.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: