$pushAll an empty list is reported as $pushAll an empty object in the logs

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.0.1
    • Component/s: Write Ops
    • Environment:
      Suse 11 Entreprise Server
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hello,

      $pushAll an empty list [] is reported as $pushAll an empty object {} in the logs :

      db.adminCommand({setParameter:1, logLevel: 1})
      db.test.save({_id: 1})
      db.test.update({_id: 1}, {'$pushAll': {'data': []}})
      db.adminCommand({getLog: 'global'})
      {
             "log" : [
               "Thu Nov 24 11:02:30 [conn193422] update errorviewer_dev.test query: { _id: 1.0 } update: { $pushAll: { data: {} } } idhack:1 0ms"
             ],
              "ok" : 1
      }
      

      This is a minor issue of course but it made me crasy investigating my code to find out why I was doing a $pushAll with and empty object {} (which is an operation error) before running the getPrevError() command to find out that in fact there were no issue and thus no such $pushAll: {} operations.

      Thank you very much !
      Cheers,
      CH

              Assignee:
              Unassigned
              Reporter:
              Charles-Henri d'Adhémar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: