summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/index_descriptor.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-12-24 21:30:52 -0500
committerEliot Horowitz <eliot@10gen.com>2013-12-30 00:42:23 -0500
commit2742ffe792e8ca072557ce2c34728c21d1d69b8d (patch)
treec5af001cd8e9c96f82cd76059c1a485f1fdb9423 /src/mongo/db/index/index_descriptor.h
parent730bcd52f2a0d17e8fab2c70fd83260a05575d20 (diff)
downloadmongo-2742ffe792e8ca072557ce2c34728c21d1d69b8d.tar.gz
SERVER-12213: IndexDescriptor no longer knows about IndexDetails
Diffstat (limited to 'src/mongo/db/index/index_descriptor.h')
-rw-r--r--src/mongo/db/index/index_descriptor.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h
index 81e164c9a4f..abcd557e0f2 100644
--- a/src/mongo/db/index/index_descriptor.h
+++ b/src/mongo/db/index/index_descriptor.h
@@ -42,14 +42,6 @@ namespace mongo {
class IndexCatalog;
/**
- * OnDiskIndexData (aka IndexDetails) is memory-mapped on-disk index data.
- * It contains two DiskLocs:
- * The first points to the head of the index. This is currently turned into a Btree node.
- * The second points to a BSONObj which describes the index.
- */
- typedef IndexDetails OnDiskIndexData;
-
- /**
* A cache of information computed from the memory-mapped per-index data (OnDiskIndexData).
* Contains accessors for the various immutable index parameters, and an accessor for the
* mutable "head" pointer which is index-specific.
@@ -62,10 +54,9 @@ namespace mongo {
* OnDiskIndexData is a pointer to the memory mapped per-index data.
* infoObj is a copy of the index-describing BSONObj contained in the OnDiskIndexData.
*/
- IndexDescriptor(Collection* collection, int indexNumber, OnDiskIndexData* data,
- BSONObj infoObj)
+ IndexDescriptor(Collection* collection, int indexNumber,BSONObj infoObj)
: _magic(123987),
- _collection(collection), _indexNumber(indexNumber), _onDiskData(data),
+ _collection(collection), _indexNumber(indexNumber),
_infoObj(infoObj.getOwned()),
_numFields(infoObj.getObjectField("key").nFields()),
_keyPattern(infoObj.getObjectField("key").getOwned()),
@@ -91,7 +82,7 @@ namespace mongo {
// XXX this is terrible
IndexDescriptor* clone() const {
- return new IndexDescriptor(_collection, _indexNumber, _onDiskData, _infoObj);
+ return new IndexDescriptor(_collection, _indexNumber,_infoObj);
}
//
@@ -154,12 +145,6 @@ namespace mongo {
// "Internals" of accessing the index, used by IndexAccessMethod(s).
//
- // Return the memory-mapped index data block.
- OnDiskIndexData& getOnDisk() { _checkOk(); return *_onDiskData; }
-
- // Return the mutable head of the index.
- const DiskLoc& getHead() const { _checkOk(); return _onDiskData->head; }
-
// Return a (rather compact) string representation.
string toString() const { _checkOk(); return _infoObj.toString(); }
@@ -202,8 +187,6 @@ namespace mongo {
// and getting multikey.
int _indexNumber;
- OnDiskIndexData* _onDiskData;
-
// The BSONObj describing the index. Accessed through the various members above.
const BSONObj _infoObj;