[SERVER-82647] Avoid getting current VectorClock in Variables::generateRuntimeConstants Created: 01/Nov/23 Updated: 24/Jan/24 Resolved: 17/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical - P2 |
| Reporter: | Mark Benvenuto | Assignee: | Justin Seyster |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | car-qw, perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-poc, perf-tiger-q4, query-perf-q4 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Participants: | |||||||||
| Story Points: | 2 | ||||||||
| Description |
|
The VectorClock is protected by a global mutex. When possible, it is preferential to avoid unnecessary calls to this global lock. One caller is the Variables::generateRuntimeConstants function which fetches the ClusterTime even though a query may never access $$CLUSTER_TIME. I believe it is possible to analyze the query for $$CLUSTER_TIME usage like $$USER_ROLES is checked for. |
| Comments |
| Comment by Justin Seyster [ 17/Jan/24 ] |
|
Closing this out, but I'll be keeping my 👀 on this mutex. |
| Comment by Cris Insignares Cuello [ 06/Nov/23 ] |
|
mark.benvenuto@mongodb.com How much is this affecting performance? |