diff options
author | Eric Cox <eric.cox@mongodb.com> | 2021-07-21 19:03:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-31 01:41:48 +0000 |
commit | 07d6e82a05dbe36f94d6a32b9378b0ddabdc8045 (patch) | |
tree | 8d9666532e2a1f37805c81a87b758c21fe4d3c57 /src/mongo/client/dbclient_mockcursor.cpp | |
parent | 63e3eaa766bf2aea4fad1333e69d7c8d52e612e8 (diff) | |
download | mongo-07d6e82a05dbe36f94d6a32b9378b0ddabdc8045.tar.gz |
SERVER-57461 Remove SPLIT_LIMITED_SORT and associated QueryPlanner code
Diffstat (limited to 'src/mongo/client/dbclient_mockcursor.cpp')
-rw-r--r-- | src/mongo/client/dbclient_mockcursor.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/client/dbclient_mockcursor.cpp b/src/mongo/client/dbclient_mockcursor.cpp index 40b505c7abe..1647111c0b4 100644 --- a/src/mongo/client/dbclient_mockcursor.cpp +++ b/src/mongo/client/dbclient_mockcursor.cpp @@ -53,7 +53,13 @@ DBClientMockCursor::DBClientMockCursor(mongo::DBClientBase* client, } bool DBClientMockCursor::more() { + if (_batchSize && batch.pos == _batchSize) { + _fillNextBatch(); + } + return batch.pos < batch.objs.size(); +} +void DBClientMockCursor::_fillNextBatch() { // Throw if requested via failpoint. mockCursorThrowErrorOnGetMore.execute([&](const BSONObj& data) { auto errorString = data["errorType"].valueStringDataSafe(); @@ -64,13 +70,6 @@ bool DBClientMockCursor::more() { uasserted(errorCode, message); }); - if (_batchSize && batch.pos == _batchSize) { - _fillNextBatch(); - } - return batch.pos < batch.objs.size(); -} - -void DBClientMockCursor::_fillNextBatch() { int leftInBatch = _batchSize; batch.objs.clear(); while (_iter.more() && (!_batchSize || leftInBatch--)) { |