[SERVER-57037] Improve precision of operator counters Created: 18/May/21  Updated: 29/Oct/23  Resolved: 26/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.14, 5.2.0, 5.1.2, 5.0.6, 4.4.13

Type: Task Priority: Major - P3
Reporter: Milena Ivanova Assignee: Milena Ivanova
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-14895 [SERVER] Investigate changes in SERVE... Closed
Related
is related to DOCS-15135 [Server] [Backport v4.4] Improve prec... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.1, v5.0, v4.4, v4.2
Sprint: Query Optimization 2021-06-28, Query Optimization 2021-07-12, Query Optimization 2021-07-26, QO 2021-09-06, Query Optimization 2021-08-09, QO 2021-09-20, QO 2021-10-04, QO 2021-10-18, QO 2021-11-01, QO 2021-08-23
Participants:

 Description   

SERVER-56422 introduced operator counters for aggregate expressions using the moment of parsing of an expression to increment its counter. Since in some cases expressions are parsed multiple times during query processing, the counter value overestimates the true expression occurrence.

The goal of this task is to implement an alternative idea with more precise counter increment using the CurOp class. The idea of Charlie is to 

  • Add counter map to the CurOp object.
  • Add APIs to CurOp to #1 increment counters and #2 transition to "parsing stats collection is over - do not track", which we can call to lock them into place once we're done the first complete parsing. e.g. in runAggregate() or FindCmd::run().
  • Once in this state any requests to increment the counters won't do anything so the code will still look pretty simple from within parseExpression().
  • Finally transition the stats from the CurOp object into the serverStatus counters during 'completeAndLogOperation'.


 Comments   
Comment by Githook User [ 28/Feb/22 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-57037 Improve precision of operator counters

(cherry picked from commit a7d667da957305b1532fa07059f2bec6b2be97b4)
(cherry picked from commit 59aa9b7fd40e1a2c96c97b7dc214778e42039f27)
(cherry picked from commit 13ed17c8e001c07ab84233ebb48f5c3f18499833)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e85ea01182531d7c7140026e55513e89058e4222

Comment by Githook User [ 13/Dec/21 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-57037 Improve precision of operator counters

(cherry picked from commit a7d667da957305b1532fa07059f2bec6b2be97b4)
(cherry picked from commit 59aa9b7fd40e1a2c96c97b7dc214778e42039f27)
Branch: v5.0
https://github.com/mongodb/mongo/commit/13ed17c8e001c07ab84233ebb48f5c3f18499833

Comment by Githook User [ 03/Dec/21 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-57037 Improve precision of operator counters

(cherry picked from commit a7d667da957305b1532fa07059f2bec6b2be97b4)
Branch: v5.1
https://github.com/mongodb/mongo/commit/59aa9b7fd40e1a2c96c97b7dc214778e42039f27

Comment by Githook User [ 25/Oct/21 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-57037 Improve precision of operator counters
Branch: master
https://github.com/mongodb/mongo/commit/a7d667da957305b1532fa07059f2bec6b2be97b4

Comment by Charlie Swanson [ 28/May/21 ]

Uh oh - does this mean we have two sprints now? “QO 2021-06-28” and “Query Optimization 2021-06-28”?

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