summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/plan_cache_clear_command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/plan_cache_clear_command.cpp')
-rw-r--r--src/mongo/db/commands/plan_cache_clear_command.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mongo/db/commands/plan_cache_clear_command.cpp b/src/mongo/db/commands/plan_cache_clear_command.cpp
index 88b3c9ef07d..9e640a5863e 100644
--- a/src/mongo/db/commands/plan_cache_clear_command.cpp
+++ b/src/mongo/db/commands/plan_cache_clear_command.cpp
@@ -90,11 +90,8 @@ Status clear(OperationContext* opCtx,
canonical_query_encoder::encodeForPlanCacheCommand(*cq))};
plan_cache_commands::removePlanCacheEntriesByPlanCacheCommandKeys(planCacheCommandKeys,
planCache);
-
- if (feature_flags::gFeatureFlagSbeFull.isEnabledAndIgnoreFCV()) {
- plan_cache_commands::removePlanCacheEntriesByPlanCacheCommandKeys(
- planCacheCommandKeys, collection->uuid(), &sbe::getPlanCache(opCtx));
- }
+ plan_cache_commands::removePlanCacheEntriesByPlanCacheCommandKeys(
+ planCacheCommandKeys, collection->uuid(), &sbe::getPlanCache(opCtx));
return Status::OK();
}
@@ -109,13 +106,11 @@ Status clear(OperationContext* opCtx,
planCache->clear();
- if (feature_flags::gFeatureFlagSbeFull.isEnabledAndIgnoreFCV()) {
- auto version = CollectionQueryInfo::get(collection).getPlanCacheInvalidatorVersion();
- sbe::clearPlanCacheEntriesWith(opCtx->getServiceContext(),
- collection->uuid(),
- version,
- false /*matchSecondaryCollections*/);
- }
+ auto version = CollectionQueryInfo::get(collection).getPlanCacheInvalidatorVersion();
+ sbe::clearPlanCacheEntriesWith(opCtx->getServiceContext(),
+ collection->uuid(),
+ version,
+ false /*matchSecondaryCollections*/);
LOGV2_DEBUG(
23908, 1, "{namespace}: Cleared plan cache", "Cleared plan cache", "namespace"_attr = ns);