summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/kv
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2019-05-15 10:34:32 -0400
committerGeert Bosch <geert@mongodb.com>2019-05-15 14:24:10 -0400
commit7d7ed50c157e0665484a1142752bde6f676b7f61 (patch)
treecb32c78a272b02d638bb07a7c622f6568108f34a /src/mongo/db/storage/kv
parentdeac75e585f0c21d0a4bdf888e249bd9bdc374c3 (diff)
downloadmongo-7d7ed50c157e0665484a1142752bde6f676b7f61.tar.gz
SERVER-41158 Remove MMAPv1 index head remnant
Diffstat (limited to 'src/mongo/db/storage/kv')
-rw-r--r--src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp11
-rw-r--r--src/mongo/db/storage/kv/kv_collection_catalog_entry.h2
-rw-r--r--src/mongo/db/storage/kv/kv_engine_test_harness.cpp6
3 files changed, 0 insertions, 19 deletions
diff --git a/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp b/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp
index 70457522913..a773e244e70 100644
--- a/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp
+++ b/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp
@@ -189,16 +189,6 @@ void KVCollectionCatalogEntry::setIndexKeyStringWithLongTypeBitsExistsOnDisk(
}
}
-void KVCollectionCatalogEntry::setIndexHead(OperationContext* opCtx,
- StringData indexName,
- const RecordId& newHead) {
- MetaData md = _getMetaData(opCtx);
- int offset = md.findIndexOffset(indexName);
- invariant(offset >= 0);
- md.indexes[offset].head = newHead;
- _catalog->putMetaData(opCtx, ns(), md);
-}
-
Status KVCollectionCatalogEntry::removeIndex(OperationContext* opCtx, StringData indexName) {
MetaData md = _getMetaData(opCtx);
@@ -226,7 +216,6 @@ Status KVCollectionCatalogEntry::prepareForIndexBuild(OperationContext* opCtx,
IndexMetaData imd;
imd.spec = spec->infoObj();
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = prefix;
imd.isBackgroundSecondaryBuild = isBackgroundSecondaryBuild;
diff --git a/src/mongo/db/storage/kv/kv_collection_catalog_entry.h b/src/mongo/db/storage/kv/kv_collection_catalog_entry.h
index bddbd19399a..cd8643bbcb7 100644
--- a/src/mongo/db/storage/kv/kv_collection_catalog_entry.h
+++ b/src/mongo/db/storage/kv/kv_collection_catalog_entry.h
@@ -63,8 +63,6 @@ public:
// 4.4 can only downgrade to 4.2 which can read long TypeBits.
void setIndexKeyStringWithLongTypeBitsExistsOnDisk(OperationContext* opCtx) final;
- void setIndexHead(OperationContext* opCtx, StringData indexName, const RecordId& newHead) final;
-
Status removeIndex(OperationContext* opCtx, StringData indexName) final;
Status prepareForIndexBuild(OperationContext* opCtx,
diff --git a/src/mongo/db/storage/kv/kv_engine_test_harness.cpp b/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
index 81c8d5f5256..182eba1cd73 100644
--- a/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
+++ b/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
@@ -373,7 +373,6 @@ TEST_F(KVCatalogTest, Idx1) {
imd.spec = BSON("name"
<< "foo");
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = KVPrefix::kNotPrefixed;
imd.isBackgroundSecondaryBuild = false;
@@ -407,7 +406,6 @@ TEST_F(KVCatalogTest, Idx1) {
imd.spec = BSON("name"
<< "foo");
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = KVPrefix::kNotPrefixed;
imd.isBackgroundSecondaryBuild = false;
@@ -461,7 +459,6 @@ TEST_F(KVCatalogTest, DirectoryPerDb1) {
imd.spec = BSON("name"
<< "foo");
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = KVPrefix::kNotPrefixed;
imd.isBackgroundSecondaryBuild = false;
@@ -513,7 +510,6 @@ TEST_F(KVCatalogTest, Split1) {
imd.spec = BSON("name"
<< "foo");
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = KVPrefix::kNotPrefixed;
imd.isBackgroundSecondaryBuild = false;
@@ -567,7 +563,6 @@ TEST_F(KVCatalogTest, DirectoryPerAndSplit1) {
imd.spec = BSON("name"
<< "foo");
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = KVPrefix::kNotPrefixed;
imd.isBackgroundSecondaryBuild = false;
@@ -624,7 +619,6 @@ TEST_F(KVCatalogTest, RestartForPrefixes) {
imd.spec = BSON("name"
<< "foo");
imd.ready = false;
- imd.head = RecordId();
imd.multikey = false;
imd.prefix = fooIndexPrefix;
imd.isBackgroundSecondaryBuild = false;