summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Larkin-York <dan.larkin-york@mongodb.com>2021-02-11 21:45:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-11 22:04:11 +0000
commitf3cdc0e6d3bcd4c3780d584f3f6759f8cea51616 (patch)
treed753ca496a2dc9d12e07d517c917ee3f8baecaf6
parentb73f99b8a8514504cb91ed0060e155f8be689b45 (diff)
downloadmongo-f3cdc0e6d3bcd4c3780d584f3f6759f8cea51616.tar.gz
Revert "SERVER-50073 Error message when creating a mixed hashed/not hashed index should state the problem"
This reverts commit b73f99b8a8514504cb91ed0060e155f8be689b45.
-rw-r--r--src/mongo/db/catalog/index_create_impl.cpp12
-rw-r--r--src/mongo/db/index/hash_access_method.cpp2
2 files changed, 3 insertions, 11 deletions
diff --git a/src/mongo/db/catalog/index_create_impl.cpp b/src/mongo/db/catalog/index_create_impl.cpp
index f6fd4d9a994..1f21757c7fc 100644
--- a/src/mongo/db/catalog/index_create_impl.cpp
+++ b/src/mongo/db/catalog/index_create_impl.cpp
@@ -336,22 +336,14 @@ StatusWith<std::vector<BSONObj>> MultiIndexBlockImpl::init(const std::vector<BSO
} catch (const WriteConflictException&) {
throw;
} catch (...) {
- auto status = exceptionToStatus();
- std::string separator =
- (status.reason().size() > 0 && status.reason()[status.reason().size() - 1] == '.')
- ? ""
- : ".";
- return {status.code(),
+ return {exceptionToStatus().code(),
str::stream() << "Caught exception during index builder initialization "
<< _collection->ns().toString()
<< " ("
<< _collection->uuid()
<< "): "
- << status.reason()
- << separator
- << " First index spec (of "
<< indexSpecs.size()
- << "): "
+ << " provided. First index spec: "
<< (indexSpecs.empty() ? BSONObj() : indexSpecs[0])};
}
}
diff --git a/src/mongo/db/index/hash_access_method.cpp b/src/mongo/db/index/hash_access_method.cpp
index a3a96a997bd..d7b79f1c0c9 100644
--- a/src/mongo/db/index/hash_access_method.cpp
+++ b/src/mongo/db/index/hash_access_method.cpp
@@ -43,7 +43,7 @@ HashAccessMethod::HashAccessMethod(IndexCatalogEntry* btreeState, SortedDataInte
// We can change these if the single-field limitation is lifted later.
uassert(16763,
- "Hashed indices currently only support a single field.",
+ "Currently only single field hashed index supported.",
1 == descriptor->getNumFields());
uassert(16764,