[SERVER-34118] CurOp should record number of upserts performed Created: 24/Mar/18  Updated: 29/Oct/23  Resolved: 07/Sep/20

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

Type: Improvement Priority: Major - P3
Reporter: Bernard Gorman Assignee: Nikita Lapkov (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-13864 Investigate changes in SERVER-34118: ... Closed
Backwards Compatibility: Minor Change
Sprint: Query 2020-09-07, Query 2020-09-21
Participants:

 Description   

Currently, update operations set a boolean flag in CurOp when they produce an upsert. This is sufficient on mongoD, since we log and profile each of the individual operations from the update command separately, and so there can only be at most one upsert per op.

However, we are now logging slow ops on mongoS as well (SERVER-14900), which dispatches writes in batches and reports the aggregated results; there may therefore be multiple upserts per op. Setting the upserted boolean results in a logline which reads upsert:1, which may be highly misleading if more than a single upsert was performed.

We should replace the upsert bool in CurOp with an integer nUpserted and log the actual number of documents upserted, on both mongoD and mongoS.



 Comments   
Comment by Githook User [ 03/Sep/20 ]

Author:

{'name': 'Nikita Lapkov', 'email': 'nikita.lapkov@mongodb.com', 'username': 'laplab'}

Message: SERVER-34118 Log number of upserts performed
Branch: master
https://github.com/mongodb/mongo/commit/cce8380c750dc9d45d88665e0e451013177fcd7a

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