summaryrefslogtreecommitdiff
path: root/src/mongo/db/index
diff options
context:
space:
mode:
authorShin Yee Tan <shinyee.tan@mongodb.com>2022-02-04 19:23:23 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-07 20:27:15 +0000
commitccd044ecf761baf8a8cb6487b2ebe676e6611599 (patch)
tree9d844e6f7c7d3fb76fc5b6f1422f403eeded5a09 /src/mongo/db/index
parente30f2dc4640aee62e0e5d75a017d5177f59b0b08 (diff)
downloadmongo-ccd044ecf761baf8a8cb6487b2ebe676e6611599.tar.gz
Revert "SERVER-62209 Add 'comment' option to 'createIndex' command"
This reverts commit f395e9d34b413781bcfb67c2674378734223466c.
Diffstat (limited to 'src/mongo/db/index')
-rw-r--r--src/mongo/db/index/index_descriptor.cpp6
-rw-r--r--src/mongo/db/index/index_descriptor.h6
2 files changed, 0 insertions, 12 deletions
diff --git a/src/mongo/db/index/index_descriptor.cpp b/src/mongo/db/index/index_descriptor.cpp
index 07ae8f1cdc5..69fac811cd6 100644
--- a/src/mongo/db/index/index_descriptor.cpp
+++ b/src/mongo/db/index/index_descriptor.cpp
@@ -106,7 +106,6 @@ constexpr StringData IndexDescriptor::kTextVersionFieldName;
constexpr StringData IndexDescriptor::kUniqueFieldName;
constexpr StringData IndexDescriptor::kHiddenFieldName;
constexpr StringData IndexDescriptor::kWeightsFieldName;
-constexpr StringData IndexDescriptor::kCommentFieldName;
IndexDescriptor::IndexDescriptor(const std::string& accessMethodName, BSONObj infoObj)
: _accessMethodName(accessMethodName),
@@ -134,11 +133,6 @@ IndexDescriptor::IndexDescriptor(const std::string& accessMethodName, BSONObj in
invariant(collationElement.isABSONObj());
_collation = collationElement.Obj().getOwned();
}
-
- if (BSONElement commentElement = _infoObj[kCommentFieldName]) {
- invariant(commentElement.isABSONObj());
- _comment = commentElement.Obj().getOwned();
- }
}
bool IndexDescriptor::isIndexVersionSupported(IndexVersion indexVersion) {
diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h
index 5cc47c3564e..76e5dce4c91 100644
--- a/src/mongo/db/index/index_descriptor.h
+++ b/src/mongo/db/index/index_descriptor.h
@@ -88,7 +88,6 @@ public:
static constexpr StringData kUniqueFieldName = "unique"_sd;
static constexpr StringData kWeightsFieldName = "weights"_sd;
static constexpr StringData kOriginalSpecFieldName = "originalSpec"_sd;
- static constexpr StringData kCommentFieldName = "comment"_sd;
/**
* infoObj is a copy of the index-describing BSONObj contained in the catalog.
@@ -227,10 +226,6 @@ public:
return _partialFilterExpression;
}
- const BSONObj& comment() const {
- return _comment;
- }
-
/**
* Returns true if the key pattern is for the _id index.
* The _id index must have form exactly {_id : 1} or {_id : -1}.
@@ -280,7 +275,6 @@ private:
IndexVersion _version;
BSONObj _collation;
BSONObj _partialFilterExpression;
- BSONObj _comment;
// Many query stages require going from an IndexDescriptor to its IndexCatalogEntry, so for
// now we need this.