[DOCS-14895] [SERVER] Investigate changes in SERVER-57037: Improve precision of operator counters Created: 26/Oct/21  Updated: 13/Nov/23  Resolved: 07/Feb/22

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 5.2.0, 5.0.6, 5.1.2, 4.4.13, 4.4.14, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Dave Cuthbert (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backports DOCS-14962 [BACKPORT] [v5.1] Improve precision o... Closed
Documented
documents SERVER-57037 Improve precision of operator counters Closed
Participants:
Days since reply: 1 year, 49 weeks ago
Epic Link: DOCSP-17171

 Description   
Downstream Change Summary

Operator counters for aggregate expressions were introduced previously. This patch improves the precision of the counters - there is no duplicate counting due to internal query processing or multiple documents. That may require small adjustments in the documentation text and examples.

Description of Linked Ticket

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 Jess Mokrzecki [ 02/Mar/22 ]

Fix Version updated for upstream SERVER-57037:
5.2.0, 5.1.2, 5.0.6, 4.4.13, 4.4.14

Comment by Jess Mokrzecki [ 02/Mar/22 ]

Fix Version updated for upstream SERVER-57037:
5.2.0, 5.1.2, 5.0.6, 4.4.14

Comment by Githook User [ 28/Feb/22 ]

Author:

{'name': 'Dave', 'email': '69165704+davemungo@users.noreply.github.com', 'username': 'davemungo'}

Message: DOCS-14895 BACKPORT (#727)

  • DOCSP-14895-BACKPORT
Comment by Jess Mokrzecki [ 28/Feb/22 ]

Fix Version updated for upstream SERVER-57037:
5.2.0, 5.1.2, 5.0.6, 4.4.13

Comment by Githook User [ 07/Feb/22 ]

Author:

{'name': 'Dave', 'email': '69165704+davemungo@users.noreply.github.com', 'username': 'davemungo'}

Message: DOCS-14895 BACKPORT (#549)
Branch: v5.2
https://github.com/10gen/docs-mongodb-internal/commit/1bf217af095f7fe7bfaa11fed86b0c7777676b81

Comment by Githook User [ 07/Feb/22 ]

Author:

{'name': 'Dave', 'email': '69165704+davemungo@users.noreply.github.com', 'username': 'davemungo'}

Message: DOCS-14895 BACKPORT (#548)
Branch: v5.0
https://github.com/10gen/docs-mongodb-internal/commit/35a458fa58799861c2c7acf456dd617f8a98fb61

Comment by Githook User [ 07/Feb/22 ]

Author:

{'name': 'Dave', 'email': '69165704+davemungo@users.noreply.github.com', 'username': 'davemungo'}

Message: DOCS-14895 improved operator counter precision (#389)

Comment by PM Bot [ 26/Oct/21 ]

Downstream changes updated for upstream SERVER-57037:
Operator counters for aggregate expressions were introduced previously. This patch improves the precision of the counters - there is no duplicate counting due to internal query processing or multiple documents. That may require small adjustments in the documentation text and examples.

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