[SERVER-55034] The profile command should not take S or X database locks Created: 08/Mar/21  Updated: 29/Oct/23  Resolved: 08/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.7, 5.0.0-rc2, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: execution_intern, newgrad
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-47360 Should only take a collection MODE_IX... Closed
Related
related to SERVER-51806 bulk key insertion phase of index bui... Closed
is related to SERVER-22541 Aggregation plan executors should be ... Closed
is related to SERVER-49102 Accept a filter expression as an alte... Closed
is related to SERVER-33889 Remove commands from embedded that sh... Closed
is related to SERVER-21409 "profile" command with read-only opti... Closed
is related to SERVER-47360 Should only take a collection MODE_IX... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4, v4.2
Sprint: Execution Team 2021-06-14
Participants:
Case:

 Description   

The profile command uses Shared and Exclusive locks to observe and change a database's profiling level, respectively.

These locks are extremely impactful and block read and write operations. Some services poll the profiling state once per minute. We should investigate how to stop taking such strong locks for this command.



 Comments   
Comment by Githook User [ 17/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-55034 profile command takes intent locks when accessing profile settings

(cherry picked from commit 74fbf87121cd1d3c94dbaf5c4bed12456d2f1ccb)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e0463ff305688f52db102f0cc605588e87daece4

Comment by Githook User [ 10/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-55034 profile command takes intent locks when accessing profile settings

(cherry picked from commit 74fbf87121cd1d3c94dbaf5c4bed12456d2f1ccb)
Branch: v5.0
https://github.com/mongodb/mongo/commit/44ec203a875bca343c2efea3b4cc205b9c630a32

Comment by Githook User [ 08/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-55034 profile command takes intent locks when accessing profile settings
Branch: master
https://github.com/mongodb/mongo/commit/74fbf87121cd1d3c94dbaf5c4bed12456d2f1ccb

Comment by Benety Goh [ 07/Jun/21 ]

This is mostly a follow-up from SERVER-47360 where we no longer require a MODE_X lock to create the system.profile collection

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