summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/find.cpp
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2015-03-09 13:24:07 -0400
committerJason Rassi <rassi@10gen.com>2015-03-09 17:28:24 -0400
commit568052f3aa85a803fbced9b848688892fdbe0290 (patch)
tree655f501e990263b43f337b068506b1ad70d0ee41 /src/mongo/db/query/find.cpp
parenta56f29e60d872bb6334a24dd732d500b3ae52b48 (diff)
downloadmongo-568052f3aa85a803fbced9b848688892fdbe0290.tar.gz
SERVER-17499 Unify GodScope and fromDBDirectClient bool
Diffstat (limited to 'src/mongo/db/query/find.cpp')
-rw-r--r--src/mongo/db/query/find.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp
index 67867835c31..dac50778085 100644
--- a/src/mongo/db/query/find.cpp
+++ b/src/mongo/db/query/find.cpp
@@ -188,8 +188,7 @@ namespace mongo {
CurOp& curop,
int pass,
bool& exhaust,
- bool* isCursorAuthorized,
- bool fromDBDirectClient) {
+ bool* isCursorAuthorized) {
// For testing, we may want to fail if we receive a getmore.
if (MONGO_FAIL_POINT(failReceivedGetmore)) {
@@ -285,7 +284,7 @@ namespace mongo {
*isCursorAuthorized = true;
// Restore the RecoveryUnit if we need to.
- if (fromDBDirectClient) {
+ if (txn->getClient()->isInDirectClient()) {
if (cc->hasRecoveryUnit())
invariant(txn->recoveryUnit() == cc->getUnownedRecoveryUnit());
}
@@ -436,7 +435,7 @@ namespace mongo {
<< endl;
if (PlanExecutor::IS_EOF == state && (queryOptions & QueryOption_CursorTailable)) {
- if (!fromDBDirectClient) {
+ if (!txn->getClient()->isInDirectClient()) {
// Don't stash the RU. Get a new one on the next getMore.
ruSwapper.reset();
delete cc->releaseOwnedRecoveryUnit();
@@ -579,8 +578,7 @@ namespace mongo {
QueryMessage& q,
const NamespaceString& nss,
CurOp& curop,
- Message &result,
- bool fromDBDirectClient) {
+ Message &result) {
// Validate the namespace.
uassert(16256, str::stream() << "Invalid ns [" << nss.ns() << "]", nss.isValid());
@@ -886,7 +884,7 @@ namespace mongo {
pq.getFilter());
ccId = cc->cursorid();
- if (fromDBDirectClient) {
+ if (txn->getClient()->isInDirectClient()) {
cc->setUnownedRecoveryUnit(txn->recoveryUnit());
}
else if (state == PlanExecutor::IS_EOF && pq.getOptions().tailable) {