summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2015-08-27 08:40:01 -0400
committerEric Milkie <milkie@10gen.com>2015-08-31 16:26:32 -0400
commit50e7b420230c014e4ae27d9aae9e0760965fe858 (patch)
treeda1e409de0f5ba27ca3e6f4f2f771769555e7ea0 /src/mongo/db/db_raii.h
parent47d6746635d26812bf578445b7c066f05648155d (diff)
downloadmongo-50e7b420230c014e4ae27d9aae9e0760965fe858.tar.gz
SERVER-20052 yield when waiting/blocking for read committed
Diffstat (limited to 'src/mongo/db/db_raii.h')
-rw-r--r--src/mongo/db/db_raii.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/db_raii.h b/src/mongo/db/db_raii.h
index b6522caad2b..bf99969f27f 100644
--- a/src/mongo/db/db_raii.h
+++ b/src/mongo/db/db_raii.h
@@ -143,20 +143,21 @@ public:
~AutoGetCollectionForRead();
Database* getDb() const {
- return _autoColl.getDb();
+ return _autoColl->getDb();
}
Collection* getCollection() const {
- return _autoColl.getCollection();
+ return _autoColl->getCollection();
}
private:
void _init(const std::string& ns, StringData coll);
+ void _ensureMajorityCommittedSnapshotIsValid(const NamespaceString& nss);
const Timer _timer;
OperationContext* const _txn;
const ScopedTransaction _transaction;
- const AutoGetCollection _autoColl;
+ boost::optional<AutoGetCollection> _autoColl;
};
/**