From 1b51a502f9201aacf760ba37b02888bbbff831da Mon Sep 17 00:00:00 2001 From: David Storch Date: Thu, 21 Oct 2021 16:29:10 -0400 Subject: SERVER-59512 add new, cleaner query interface to DBClientBase The new interface uses FindCommandRequest, and avoids any characteristics that relate specifically to the no-longer-supported OP_QUERY wire protocol message. This patch moves all callers of 'findOne()' onto the new API, but more work is required to fully eliminate the old 'query()' API from DBClientBase. --- src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp') diff --git a/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp b/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp index 1b341ab4b11..08f95264959 100644 --- a/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp +++ b/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp @@ -49,7 +49,7 @@ BSONObj getPersistedDefaultRWConcernDocument(OperationContext* opCtx) { !MONGO_unlikely(failRWCDefaultsLookup.shouldFail())); DBDirectClient client(opCtx); - return client.findOne(NamespaceString::kConfigSettingsNamespace.toString(), + return client.findOne(NamespaceString::kConfigSettingsNamespace, BSON("_id" << ReadWriteConcernDefaults::kPersistedDocumentId)); } -- cgit v1.2.1