summaryrefslogtreecommitdiff
path: root/src/mongo/db/fle_crud.cpp
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/db/fle_crud.cpp
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/db/fle_crud.cpp')
-rw-r--r--src/mongo/db/fle_crud.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/db/fle_crud.cpp b/src/mongo/db/fle_crud.cpp
index 740df62969a..dfeb35c1487 100644
--- a/src/mongo/db/fle_crud.cpp
+++ b/src/mongo/db/fle_crud.cpp
@@ -41,9 +41,7 @@
#include "mongo/crypto/encryption_fields_gen.h"
#include "mongo/crypto/fle_crypto.h"
#include "mongo/db/auth/authorization_session.h"
-#include "mongo/db/dbdirectclient.h"
#include "mongo/db/namespace_string.h"
-#include "mongo/db/operation_time_tracker.h"
#include "mongo/db/ops/write_ops_gen.h"
#include "mongo/db/ops/write_ops_parsers.h"
#include "mongo/db/query/collation/collator_factory_interface.h"
@@ -114,8 +112,7 @@ void replyToResponse(OperationContext* opCtx,
// committed. The Transaction API propagates the OpTime from the commit transaction onto the
// current thread so grab it from TLS and change the OpTime on the reply.
//
- response->setLastOp({OperationTimeTracker::get(opCtx)->getMaxOperationTime().asTimestamp(),
- repl::OpTime::kUninitializedTerm});
+ response->setLastOp(repl::ReplClientInfo::forClient(opCtx->getClient()).getLastOp());
}
void responseToReply(const BatchedCommandResponse& response,
@@ -1283,10 +1280,12 @@ uint64_t FLEQueryInterfaceImpl::countDocuments(const NamespaceString& nss) {
CountCommandRequest ccr(nss);
auto opMsgRequest = ccr.serialize(BSONObj());
- DBDirectClient directClient(opCtx.get());
- auto uniqueReply = directClient.runCommand(opMsgRequest);
+ auto requestMessage = opMsgRequest.serialize();
- auto reply = uniqueReply->getCommandReply();
+ auto serviceEntryPoint = opCtx->getServiceContext()->getServiceEntryPoint();
+ DbResponse dbResponse = serviceEntryPoint->handleRequest(opCtx.get(), requestMessage).get();
+
+ auto reply = rpc::makeReply(&dbResponse.response)->getCommandReply().getOwned();
auto status = getStatusFromWriteCommandReply(reply);
uassertStatusOK(status);