diff options
Diffstat (limited to 'src/mongo/db/timeseries/timeseries_options.cpp')
-rw-r--r-- | src/mongo/db/timeseries/timeseries_options.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/timeseries/timeseries_options.cpp b/src/mongo/db/timeseries/timeseries_options.cpp index d3d9b3693d0..d384f662a99 100644 --- a/src/mongo/db/timeseries/timeseries_options.cpp +++ b/src/mongo/db/timeseries/timeseries_options.cpp @@ -59,6 +59,14 @@ Status isTimeseriesGranularityValidAndUnchanged(const TimeseriesOptions& current bool allowSecondsParameters = feature_flags::gTimeseriesScalabilityImprovements.isEnabled( serverGlobalParams.featureCompatibility); + // If the timeseries options are completely empty, we can skip updating them. + if (!targetGranularity.has_value() && !targetOptions.getBucketMaxSpanSeconds().has_value() && + !targetOptions.getBucketRoundingSeconds().has_value()) { + if (shouldUpdateOptions) + *shouldUpdateOptions = false; + return Status::OK(); + } + if (shouldUpdateOptions) { *shouldUpdateOptions = true; } |