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

Aggregation with $out results in error when Auditing is enabled

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6
    • Sprint:
      Platforms 2018-08-13
    • Case:

      Description

      MongoDB version 3.6.

      When auditing is enabled, aggregation query with $out, fails with the error "Size must be between 0 and 16793600(16MB) error" even though there is no document in the collection that is greater than 16MB. 

      For example, with auditing enabled on mongod, when the following query is executed:

        

      db.collection.aggregate([ {$match:{}}, {$out:"collection2"} ],{allowDiskUse:true})

       

      it throws this error:

       

      assert: command failed: { "operationTime" : Timestamp(1529677911, 2), "ok" : 0, "errmsg" : "insert for $out failed: { lastOp: { ts: Timestamp(1529677911, 1), t: 4 } , connectionId: 202, err: \"BSONObj size: 16793954 (0x1004162) is invalid. Size must be between 0 and 16793600(16MB) First element: : { _id: ObjectId('5b2854bfee28fa281454cb45'),...\", code: 10334, codeName: \"Location10334\", n: 0, ok: 1.0, operationTime: Timestamp(1529677911, 1), $gleStats: { lastOpTime: { ts: Timestamp(1529677911, 1), t: 4 } , electionId: ObjectId('7fffffff0000000000000004') }, $clusterTime: { clusterTime: Timestamp(1529677911, 1), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } }, $configServerState: { opTime: { ts:

       

       
       
      When auditing is not enabled, the aggregation query succeeds.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: