[SERVER-65454] Retried findAndModify requests can slow log/profile into the wrong namespace Created: 11/Apr/22  Updated: 29/Oct/23  Resolved: 14/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.1, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Participants:

 Description   

A variety of callers can use AutoStatsTracker who's constructor changes the namespace state of an operation.

However, the destructor does not restore the state. Thus a retried findAndModify can log a slow query/system.profile entry under the config.image_collection namespace.

While this is probably a subtle yet widespread problem, this ticket aims to correct the scenario just for the config.image_collection lookup in the findAndModify code paths.



 Comments   
Comment by Githook User [ 27/Jul/22 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-65454: Reset curop namespace after config.image_collection lookup.

(cherry picked from commit 4606b3cd56fd4ca9c5c39ebc8a0f7e0cfb790f9e)
Branch: v6.0
https://github.com/mongodb/mongo/commit/a867b133ed409fddee89a037c44cb2589b510e12

Comment by Githook User [ 13/Apr/22 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-65454: Reset curop namespace after config.image_collection lookup.
Branch: master
https://github.com/mongodb/mongo/commit/4606b3cd56fd4ca9c5c39ebc8a0f7e0cfb790f9e

Generated at Thu Feb 08 06:02:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.