diff options
author | Benety Goh <benety@mongodb.com> | 2021-06-08 12:12:04 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-08 16:44:16 +0000 |
commit | 74fbf87121cd1d3c94dbaf5c4bed12456d2f1ccb (patch) | |
tree | 5c7dac48b5692c85d18c935cf9c1ea7b1a612e4c /src/mongo/db | |
parent | 6489baf485d4fc5ee60ea48f6a145b9516435afa (diff) | |
download | mongo-74fbf87121cd1d3c94dbaf5c4bed12456d2f1ccb.tar.gz |
SERVER-55034 profile command takes intent locks when accessing profile settings
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/commands/dbcommands_d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/dbcommands_d.cpp b/src/mongo/db/commands/dbcommands_d.cpp index 4184a0af2ce..8e9e40ab9b5 100644 --- a/src/mongo/db/commands/dbcommands_d.cpp +++ b/src/mongo/db/commands/dbcommands_d.cpp @@ -162,7 +162,7 @@ protected: // need to read the current filter, if any. If we're not changing either value, then we can // acquire a shared lock instead of exclusive. const bool readOnly = (profilingLevel < 0 || profilingLevel > 2) && !request.getFilter(); - const LockMode dbMode = readOnly ? MODE_S : MODE_X; + const LockMode dbMode = readOnly ? MODE_IS : MODE_IX; // Accessing system.profile collection should not conflict with oplog application. ShouldNotConflictWithSecondaryBatchApplicationBlock shouldNotConflictBlock( |