summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorDan Larkin-York <dan.larkin-york@mongodb.com>2021-02-11 21:44:12 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-11 22:11:10 +0000
commit1a09a40b8e42f9b682d602e168699327607da218 (patch)
treed63b4e41964d4ad87e18b9bf06c98c71279275b6 /src/mongo/db
parent9f1134a47c9a2a75a6e7f90ace05a6664292c391 (diff)
downloadmongo-1a09a40b8e42f9b682d602e168699327607da218.tar.gz
Revert "SERVER-50073 Error message when creating a mixed hashed/not hashed index should state the problem"
This reverts commit 2084b2b2baba4028d7cbc0cb3dc22222e25bb6f8.
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/catalog/multi_index_block.cpp12
-rw-r--r--src/mongo/db/index/hash_access_method.cpp2
2 files changed, 4 insertions, 10 deletions
diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp
index 36eb9c08eb2..60720c89443 100644
--- a/src/mongo/db/catalog/multi_index_block.cpp
+++ b/src/mongo/db/catalog/multi_index_block.cpp
@@ -433,17 +433,11 @@ StatusWith<std::vector<BSONObj>> MultiIndexBlock::init(OperationContext* opCtx,
} 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() << " (" << collection->uuid()
- << "): " << status.reason() << separator << " First index spec (of "
- << indexSpecs.size()
- << "): " << (indexSpecs.empty() ? BSONObj() : indexSpecs[0])};
+ << "): " << 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 27c51f15c14..d7d91f48239 100644
--- a/src/mongo/db/index/hash_access_method.cpp
+++ b/src/mongo/db/index/hash_access_method.cpp
@@ -42,7 +42,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,