From ccd044ecf761baf8a8cb6487b2ebe676e6611599 Mon Sep 17 00:00:00 2001 From: Shin Yee Tan Date: Fri, 4 Feb 2022 19:23:23 +0000 Subject: Revert "SERVER-62209 Add 'comment' option to 'createIndex' command" This reverts commit f395e9d34b413781bcfb67c2674378734223466c. --- src/mongo/db/index/index_descriptor.cpp | 6 ------ src/mongo/db/index/index_descriptor.h | 6 ------ 2 files changed, 12 deletions(-) (limited to 'src/mongo/db/index') 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. -- cgit v1.2.1