[SERVER-23635] The 'keyUpdates' metric only reflects the last document updated when performing a multi-update Created: 11/Apr/16  Updated: 06/Dec/22  Resolved: 15/Apr/16

Status: Closed
Project: Core Server
Component/s: Diagnostics, Querying
Affects Version/s: 3.0.11, 3.2.4, 3.3.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-23272 Remove misleading/not useful diagnost... Closed
Assigned Teams:
Query
Operating System: ALL
Steps To Reproduce:

db.test.drop();
db.test.createIndex({a: 1})
for (var j=0; j < 10; ++j) { db.test.insert({a: j}); }
db.setProfilingLevel(2);
db.test.update({a: {$gte: 0}}, {$inc: {a: 1}}, {multi: true});
var profileDoc = db.system.profile.find().sort({$natural: -1}).next();
assert.eq(10, profileDoc.keyUpdates, tojson(profileDoc));

Participants:

 Description   

The OpDebug::keyUpdates metric is zeroed out on every call to Collection::updateDocument.

https://github.com/mongodb/mongo/blob/r3.3.4/src/mongo/db/catalog/collection.cpp#L628-L629

This metric will be removed for 3.4 under SERVER-23272 but we may want to consider backporting a fix to previous releases.



 Comments   
Comment by Ian Whalen (Inactive) [ 15/Apr/16 ]

keyupdates will be replaced by keysinserted and keysdeleted via SERVER-23272

Generated at Thu Feb 08 04:04:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.