Shell bulk operations should not accept maxTimeMS parameter

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.6.0-rc0
    • Affects Version/s: 2.5.5
    • Component/s: Shell
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The shell's initializeUnorderedBulkOp and initializeOrderedBulkOp are both written to accept a maxTimeMS parameter, but the parameter is ignored.

      > db.adminCommand({configureFailPoint: 'maxTimeAlwaysTimeOut', mode: 'alwaysOn'})
      { "ok" : 1 }
      > // regular insert fails as expected
      > db.runCommand({insert: 'collection', documents: [{_id: 1}], ordered: false, maxTimeMS: 1})
      { "ok" : 0, "errmsg" : "operation exceeded time limit", "code" : 50 }
      > // batch should fail, too, but succeeds
      > var batch = db.collection.initializeUnorderedBulkOp({maxTimeMS: 1})
      > batch.insert({_id: 2})
      > batch.execute()
      BulkWriteResult({
      	"writeErrors" : [ ],
      	"writeConcernErrors" : [ ],
      	"nInserted" : 1,
      	"nUpserted" : 0,
      	"nUpdated" : 0,
      	"nModified" : 0,
      	"nRemoved" : 0,
      	"upserted" : [ ]
      })
      

      For now, bulk operations should not accept a maxTimeMS parameter at all.

            Assignee:
            A. Jesse Jiryu Davis
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: