summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishnu Kaushik <vishnu.kaushik@mongodb.com>2020-09-11 20:08:59 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-17 21:11:09 +0000
commitc143d2a9dde2f6713a44b41e35a0553d8004ebc7 (patch)
tree6bc786c1d3e236278e4b57aa619dad41bc7613f7
parent7aee7ea11a58a81629d2d9d64bafb85f4e5b00e7 (diff)
downloadmongo-c143d2a9dde2f6713a44b41e35a0553d8004ebc7.tar.gz
SERVER-48328 remove index key generation error whitelist
(cherry picked from commit e4b7ca4206b59fe54e0da6cfe3ae03aea8114be6)
-rw-r--r--src/mongo/db/index/index_access_method.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/mongo/db/index/index_access_method.cpp b/src/mongo/db/index/index_access_method.cpp
index a1b37c3a7a3..d5f3fe76074 100644
--- a/src/mongo/db/index/index_access_method.cpp
+++ b/src/mongo/db/index/index_access_method.cpp
@@ -764,31 +764,6 @@ void AbstractIndexAccessMethod::getKeys(const BSONObj& obj,
MultikeyPaths* multikeyPaths,
boost::optional<RecordId> id,
OnSuppressedErrorFn onSuppressedError) const {
- static stdx::unordered_set<int> whiteList{ErrorCodes::CannotBuildIndexKeys,
- // Btree
- ErrorCodes::CannotIndexParallelArrays,
- // FTS
- 16732,
- 16733,
- 16675,
- 17261,
- 17262,
- // Hash
- 16766,
- // Ambiguous array field name
- 16746,
- // Haystack
- 16775,
- 16776,
- // 2dsphere geo
- 16755,
- 16756,
- // 2d geo
- 16804,
- 13067,
- 13068,
- 13026,
- 13027};
try {
doGetKeys(obj, context, keys, multikeyMetadataKeys, multikeyPaths, id);
} catch (const AssertionException& ex) {
@@ -801,8 +776,8 @@ void AbstractIndexAccessMethod::getKeys(const BSONObj& obj,
if (multikeyPaths) {
multikeyPaths->clear();
}
- // Only suppress the errors in the whitelist.
- if (whiteList.find(ex.code()) == whiteList.end()) {
+
+ if (ex.isA<ErrorCategory::Interruption>() || ex.isA<ErrorCategory::ShutdownError>()) {
throw;
}