diff options
-rw-r--r-- | src/mongo/db/fle_crud.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_write_cmd.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/fle_crud.cpp b/src/mongo/db/fle_crud.cpp index 3cdaa83e8a8..1b2d86c0bff 100644 --- a/src/mongo/db/fle_crud.cpp +++ b/src/mongo/db/fle_crud.cpp @@ -963,6 +963,7 @@ std::unique_ptr<BatchedCommandRequest> processFLEBatchExplain( newDeleteOp.getQ(), &getTransactionWithRetriesForMongoS)); deleteRequest.setDeletes({newDeleteOp}); + deleteRequest.getWriteCommandRequestBase().setEncryptionInformation(boost::none); return std::make_unique<BatchedCommandRequest>(deleteRequest); } else if (request.getBatchType() == BatchedCommandRequest::BatchType_Update) { auto updateRequest = request.getUpdateRequest(); @@ -974,6 +975,7 @@ std::unique_ptr<BatchedCommandRequest> processFLEBatchExplain( newUpdateOp.getQ(), &getTransactionWithRetriesForMongoS)); updateRequest.setUpdates({newUpdateOp}); + updateRequest.getWriteCommandRequestBase().setEncryptionInformation(boost::none); return std::make_unique<BatchedCommandRequest>(updateRequest); } MONGO_UNREACHABLE; diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp index e35117313b4..10d04ba0b82 100644 --- a/src/mongo/s/commands/cluster_write_cmd.cpp +++ b/src/mongo/s/commands/cluster_write_cmd.cpp @@ -653,6 +653,9 @@ void ClusterWriteCmd::InvocationBase::explain(OperationContext* opCtx, (_batchedRequest.getBatchType() == BatchedCommandRequest::BatchType_Delete || _batchedRequest.getBatchType() == BatchedCommandRequest::BatchType_Update)) { req = processFLEBatchExplain(opCtx, _batchedRequest); + tassert(6636600, + "encryptionInformation should be stripped from request after rewriting for explain", + !req->hasEncryptionInformation()); } auto nss = req ? req->getNS() : _batchedRequest.getNS(); |