diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-04-24 17:44:20 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-04-26 09:44:01 -0400 |
commit | 381a35be63129419516c77825c2a27e7fc447e63 (patch) | |
tree | 90285bbc743edac9f5354bd308cc65498cde8d15 /src/mongo/db/index/index_descriptor.h | |
parent | bced3d215a395fa2872b9931d971fef7138d3e94 (diff) | |
download | mongo-381a35be63129419516c77825c2a27e7fc447e63.tar.gz |
SERVER-13632 Get rid of DiskLoc::obj (Part 1)
DiskLoc::obj references the durability subsystem through thread local
variables. With this change the accesses become explicit through the
collection.
Diffstat (limited to 'src/mongo/db/index/index_descriptor.h')
-rw-r--r-- | src/mongo/db/index/index_descriptor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h index 293100bf3ad..b3eb54aa6b1 100644 --- a/src/mongo/db/index/index_descriptor.h +++ b/src/mongo/db/index/index_descriptor.h @@ -153,8 +153,9 @@ namespace mongo { // Return the info object. const BSONObj& infoObj() const { _checkOk(); return _infoObj; } - // this is the owner of this IndexDescriptor - IndexCatalog* getIndexCatalog() const { return _collection->getIndexCatalog(); } + // Both the collection and the catalog must outlive the IndexDescriptor + const Collection* getCollection() const { return _collection; } + const IndexCatalog* getIndexCatalog() const { return _collection->getIndexCatalog(); } bool areIndexOptionsEquivalent( const IndexDescriptor* other ) const; |