summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/accumulator_sum.cpp
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2021-04-14 14:02:26 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-15 15:52:49 +0000
commit53230099fc21fe4c4bf60e26420ca2e839ec22f1 (patch)
tree9d8a7f1e3efffb688f3b548dc221f677b40e3d4b /src/mongo/db/pipeline/accumulator_sum.cpp
parent3ae9fdc2db43b1cfcf17dca698a1655ccdcc5427 (diff)
downloadmongo-53230099fc21fe4c4bf60e26420ca2e839ec22f1.tar.gz
SERVER-55826 Disallow $count accumulator in persisted pipelines unless FCV is 5.0 or greater
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_sum.cpp')
-rw-r--r--src/mongo/db/pipeline/accumulator_sum.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/accumulator_sum.cpp b/src/mongo/db/pipeline/accumulator_sum.cpp
index bc1eb451d9a..53cb45563dd 100644
--- a/src/mongo/db/pipeline/accumulator_sum.cpp
+++ b/src/mongo/db/pipeline/accumulator_sum.cpp
@@ -48,7 +48,8 @@ using boost::intrusive_ptr;
REGISTER_ACCUMULATOR(sum, genericParseSingleExpressionAccumulator<AccumulatorSum>);
REGISTER_EXPRESSION(sum, ExpressionFromAccumulator<AccumulatorSum>::parse);
REGISTER_REMOVABLE_WINDOW_FUNCTION(sum, AccumulatorSum, WindowFunctionSum);
-REGISTER_ACCUMULATOR(count, parseCountAccumulator);
+REGISTER_ACCUMULATOR_WITH_MIN_VERSION(
+ count, parseCountAccumulator, ServerGlobalParams::FeatureCompatibility::Version::kVersion50);
const char* AccumulatorSum::getOpName() const {
return "$sum";