summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2022-10-24 01:50:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-24 02:21:48 +0000
commit54e1dbc67009010a27ec762d389b4ae7d74a996b (patch)
treee1ebe3338b06f6fa60d8e8a78f9ef925ae4b9e71
parent5c0815dea7e7f85f6f3b7d2a6a9dc8663682c72f (diff)
downloadmongo-54e1dbc67009010a27ec762d389b4ae7d74a996b.tar.gz
SERVER-70125 Catch DBException inside QueryAnalysisSampler's periodic job
-rw-r--r--src/mongo/s/query_analysis_sampler.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/s/query_analysis_sampler.cpp b/src/mongo/s/query_analysis_sampler.cpp
index 0cad2a0cf64..b93779ed0a3 100644
--- a/src/mongo/s/query_analysis_sampler.cpp
+++ b/src/mongo/s/query_analysis_sampler.cpp
@@ -82,7 +82,14 @@ void QueryAnalysisSampler::onStartup() {
"QueryAnalysisConfigurationsRefresher",
[this](Client* client) {
auto opCtx = client->makeOperationContext();
- _refreshConfigurations(opCtx.get());
+ try {
+ _refreshConfigurations(opCtx.get());
+ } catch (DBException& ex) {
+ LOGV2(7012500,
+ "Failed to refresh query analysis configurations, will try again at the next "
+ "interval",
+ "error"_attr = redact(ex));
+ }
},
Seconds(gQueryAnalysisSamplerConfigurationRefreshSecs));
_periodicConfigurationsRefresher =