summaryrefslogtreecommitdiff
path: root/src/mongo/db/fle_crud.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2022-04-09 11:08:41 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-09 18:18:22 +0000
commit180baae184f16c26070b4a84d98d86ef164bdfc5 (patch)
tree3a8914cb3e048225e2f04ca072234adc7a21c9e7 /src/mongo/db/fle_crud.h
parentdc271946221f20e8629d74104d3252862741949e (diff)
downloadmongo-180baae184f16c26070b4a84d98d86ef164bdfc5.tar.gz
SERVER-59261 Enable Feature flag for PM-2466
Diffstat (limited to 'src/mongo/db/fle_crud.h')
-rw-r--r--src/mongo/db/fle_crud.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/db/fle_crud.h b/src/mongo/db/fle_crud.h
index d1499ccb669..2bd2c0f8086 100644
--- a/src/mongo/db/fle_crud.h
+++ b/src/mongo/db/fle_crud.h
@@ -42,6 +42,7 @@
#include "mongo/db/ops/write_ops_gen.h"
#include "mongo/db/pipeline/pipeline.h"
#include "mongo/db/query/count_command_gen.h"
+#include "mongo/db/server_options.h"
#include "mongo/db/transaction_api.h"
#include "mongo/s/write_ops/batch_write_exec.h"
#include "mongo/s/write_ops/batched_command_response.h"
@@ -213,12 +214,18 @@ std::unique_ptr<Pipeline, PipelineDeleter> processFLEPipelineD(
*/
template <typename T>
bool shouldDoFLERewrite(const std::unique_ptr<T>& cmd) {
- return gFeatureFlagFLE2.isEnabledAndIgnoreFCV() && cmd->getEncryptionInformation();
+ // TODO (SERVER-65077): Remove FCV check once 6.0 is released
+ return (!serverGlobalParams.featureCompatibility.isVersionInitialized() ||
+ gFeatureFlagFLE2.isEnabled(serverGlobalParams.featureCompatibility)) &&
+ cmd->getEncryptionInformation();
}
template <typename T>
bool shouldDoFLERewrite(const T& cmd) {
- return gFeatureFlagFLE2.isEnabledAndIgnoreFCV() && cmd.getEncryptionInformation();
+ // TODO (SERVER-65077): Remove FCV check once 6.0 is released
+ return (!serverGlobalParams.featureCompatibility.isVersionInitialized() ||
+ gFeatureFlagFLE2.isEnabled(serverGlobalParams.featureCompatibility)) &&
+ cmd.getEncryptionInformation();
}
/**