Skip to content

Commit f044f77

Browse files
committed
do not create extra NamespaceString
1 parent 8e2ca0c commit f044f77

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/mongo/db/instance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ namespace mongo {
209209
audit::logQueryAuthzCheck(client, ns, q.query, status.code());
210210
uassertStatusOK(status);
211211
}
212-
dbresponse.exhaustNS = runQuery(txn, m, q, op, *resp, fromDBDirectClient);
212+
dbresponse.exhaustNS = runQuery(txn, m, q, ns, op, *resp, fromDBDirectClient);
213213
verify( !resp->empty() );
214214
}
215215
catch ( SendStaleConfigException& e ){

src/mongo/db/query/find.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,11 @@ namespace mongo {
540540
std::string runQuery(OperationContext* txn,
541541
Message& m,
542542
QueryMessage& q,
543+
const NamespaceString& nss,
543544
CurOp& curop,
544545
Message &result,
545546
bool fromDBDirectClient) {
546547
// Validate the namespace.
547-
const NamespaceString nss(q.ns);
548548
uassert(16256, str::stream() << "Invalid ns [" << nss.ns() << "]", nss.isValid());
549549

550550
// Set curop information.

src/mongo/db/query/find.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ namespace mongo {
7474
std::string runQuery(OperationContext* txn,
7575
Message& m,
7676
QueryMessage& q,
77+
const NamespaceString& ns,
7778
CurOp& curop,
7879
Message &result,
7980
bool fromDBDirectClient);

0 commit comments

Comments
 (0)