[SERVER-23357] db.serverStatus.metrics.document.inserted is double what it should be Created: 25/Mar/16  Updated: 16/May/16  Resolved: 05/May/16

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23128 Refactor write cmd path Closed
Related
related to SERVER-15238 Add jstests for serverStatus().metrics Backlog
related to SERVER-17862 Unify stats reporting for log/profile... Closed
Operating System: ALL
Participants:

 Description   

It is incremented by two with each insert:

> db.serverStatus().metrics.document.inserted
NumberLong(24322)
> db.foo.insert({});
WriteResult({ "nInserted" : 1 })
> db.serverStatus().metrics.document.inserted
NumberLong(24324)

This is not due to the matching inserts to the oplog as this host is a standalone.



 Comments   
Comment by David Storch [ 05/May/16 ]

This has been fixed by the write path refactor in SERVER-23128. Closing as a duplicate.

Comment by Mathias Stearn [ 08/Apr/16 ]

This is caused by calling recordCurOpMetrics twice on the same CurOp. The other write commands nest their curops, but insert operates directly on the top-level curop. This curop automatically gets its metrics recorded at the end of every op so it should not be called by insert.

Comment by J Rassi [ 26/Mar/16 ]

Linking to SERVER-17862, SERVER-15238.

Moving to query team triage backlog for possible inclusion in the CRUD diagnostics project.

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