diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2017-03-02 13:54:24 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2017-03-15 11:03:44 -0400 |
commit | f05b9437fbdc53deecf55ed3c20e36af3d733953 (patch) | |
tree | 8b66acc133f83f27ef00f31600538f225ec2746a /src/mongo/db/commands/index_filter_commands.cpp | |
parent | a1f15dfd788a78da77bda6675132d4144691fce1 (diff) | |
download | mongo-f05b9437fbdc53deecf55ed3c20e36af3d733953.tar.gz |
SERVER-22541 Refactor RAII locking helpers.
Removes the class 'ScopedTransaction' and moves the responsibility of
abandoning the snapshot onto the GlobalLock class. Also renames the
AutoGetCollectionForRead class to AutoGetCollectionForReadCommand, and
adds a new AutoGetCollectionForRead class. Unlike
AutoGetCollectionForReadCommand, this new class will not update the
namespace on the CurrentOp object, nor will it add an entry to Top.
Diffstat (limited to 'src/mongo/db/commands/index_filter_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/index_filter_commands.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index 68230d587af..d85565ab49c 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -165,7 +165,7 @@ Status ListFilters::runIndexFilterCommand(OperationContext* opCtx, BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query settings is owned by the collection. - AutoGetCollectionForRead ctx(opCtx, NamespaceString(ns)); + AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); QuerySettings* querySettings; PlanCache* unused; @@ -233,7 +233,7 @@ Status ClearFilters::runIndexFilterCommand(OperationContext* opCtx, BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query settings is owned by the collection. - AutoGetCollectionForRead ctx(opCtx, NamespaceString(ns)); + AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); QuerySettings* querySettings; PlanCache* planCache; @@ -335,7 +335,7 @@ Status SetFilter::runIndexFilterCommand(OperationContext* opCtx, BSONObjBuilder* bob) { // This is a read lock. The query settings is owned by the collection. const NamespaceString nss(ns); - AutoGetCollectionForRead ctx(opCtx, nss); + AutoGetCollectionForReadCommand ctx(opCtx, nss); QuerySettings* querySettings; PlanCache* planCache; |