summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2022-07-04 14:08:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-11 09:27:41 +0000
commit9b9d2338477361c04cf44ac7a098bd0cdee4bbd4 (patch)
tree333144376200508c9c09e252e17fc57752b46b49
parent352885416d303d7fd64337457528a74296280151 (diff)
downloadmongo-9b9d2338477361c04cf44ac7a098bd0cdee4bbd4.tar.gz
SERVER-40865 Retry CatalogCache refresh on QueryPlanKilled error
-rw-r--r--src/mongo/s/catalog_cache.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/s/catalog_cache.cpp b/src/mongo/s/catalog_cache.cpp
index e8ce4063e80..bcc812cf022 100644
--- a/src/mongo/s/catalog_cache.cpp
+++ b/src/mongo/s/catalog_cache.cpp
@@ -789,8 +789,9 @@ void CatalogCache::_scheduleCollectionRefresh(WithLock lk,
onRefreshCompleted(status, nullptr);
// It is possible that the metadata is being changed concurrently, so retry the
- // refresh again
- if (status == ErrorCodes::ConflictingOperationInProgress &&
+ // refresh again. The QueryPlanKilled error might be triggered by a local read of the SSCCL.
+ if ((status == ErrorCodes::ConflictingOperationInProgress ||
+ status == ErrorCodes::QueryPlanKilled) &&
refreshAttempt < kMaxInconsistentRoutingInfoRefreshAttempts) {
_scheduleCollectionRefresh(lk, collEntry, nss, refreshAttempt + 1);
} else {