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

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

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

      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 Unassigned
            Reporter:
            cdadhemar Charles-Henri d'Adhémar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: