[SERVER-4370] $pushAll an empty list is reported as $pushAll an empty object in the logs Created: 24/Nov/11  Updated: 07/Mar/14  Resolved: 23/Jan/14

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 2.0.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Charles-Henri d'Adhémar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: log, logging, logs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Suse 11 Entreprise Server


Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

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



 Comments   
Comment by Scott Hernandez (Inactive) [ 23/Jan/14 ]

With the current code (soon to be 2.6.0) this has gone away:

"2014-01-23T09:06:20.810-0500 [conn1] command test.$cmd command: { update: \"test\", updates: [ { q: { _id: 1.0 }, u: { $pushAll: { data: [] } }, multi: false, upsert: false } ], ordered: true } keyUpdates:0 numYields:0  reslen:71 6ms",

Generated at Thu Feb 08 03:05:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.