diff options
author | Eric Milkie <milkie@10gen.com> | 2015-08-27 08:40:01 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-08-31 16:26:32 -0400 |
commit | 50e7b420230c014e4ae27d9aae9e0760965fe858 (patch) | |
tree | da1e409de0f5ba27ca3e6f4f2f771769555e7ea0 /src/mongo/db/db_raii.h | |
parent | 47d6746635d26812bf578445b7c066f05648155d (diff) | |
download | mongo-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.h | 7 |
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; }; /** |