diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2014-03-19 14:44:27 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-03-19 14:51:07 -0400 |
commit | 8492832436f2a4cb1ffc621a0e982d262c97d6f3 (patch) | |
tree | 8a98428daf972c07ae5c45535a2c1848ac8f04d1 | |
parent | 99cd103ecfcaefbf01ccf9b080924e4ca52fd44c (diff) | |
download | mongo-8492832436f2a4cb1ffc621a0e982d262c97d6f3.tar.gz |
SERVER-13280 don't ignore deletions of DiskLoc(s) when yielding in idhack runner
-rw-r--r-- | src/mongo/db/query/idhack_runner.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/query/idhack_runner.cpp b/src/mongo/db/query/idhack_runner.cpp index ed6db94123d..2ac97e02aef 100644 --- a/src/mongo/db/query/idhack_runner.cpp +++ b/src/mongo/db/query/idhack_runner.cpp @@ -107,10 +107,9 @@ namespace mongo { // Look up the key by going directly to the Btree. DiskLoc loc = accessMethod->findSingle( _key ); - _done = true; - // Key not found. if (loc.isNull()) { + _done = true; return Runner::RUNNER_EOF; } @@ -150,6 +149,7 @@ namespace mongo { ClientCursor::staticYield(micros, "", record); // This can happen when we're yielded for various reasons (e.g. db/idx dropped). if (_killed) { + _done = true; return Runner::RUNNER_DEAD; } } @@ -165,6 +165,7 @@ namespace mongo { KeyPattern kp(m->getKeyPattern()); if (!m->keyBelongsToMe( kp.extractSingleKey(*objOut))) { // We have something with a matching _id but it doesn't belong to me. + _done = true; return Runner::RUNNER_EOF; } } @@ -176,6 +177,7 @@ namespace mongo { *dlOut = loc; } + _done = true; return Runner::RUNNER_ADVANCED; } |