diff options
author | Matthew Russotto <matthew.russotto@10gen.com> | 2018-09-13 12:07:06 -0400 |
---|---|---|
committer | Matthew Russotto <matthew.russotto@10gen.com> | 2018-09-21 10:13:20 -0400 |
commit | 71d65cbf5daaae442d7b1d28142b7b76a9b2e83b (patch) | |
tree | 908d2e58e484a37aff5ae8192025e7d5a865693c /src/mongo/client/dbclient_base.h | |
parent | 44290425aebb3e6db398a55169c6c5864a48829c (diff) | |
download | mongo-71d65cbf5daaae442d7b1d28142b7b76a9b2e83b.tar.gz |
SERVER-36536 Add a server parameter to not use exhaust option for initial sync.
Diffstat (limited to 'src/mongo/client/dbclient_base.h')
-rw-r--r-- | src/mongo/client/dbclient_base.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/client/dbclient_base.h b/src/mongo/client/dbclient_base.h index c6a8ebf2f0e..965e9fb89f3 100644 --- a/src/mongo/client/dbclient_base.h +++ b/src/mongo/client/dbclient_base.h @@ -590,10 +590,12 @@ public: int batchSize = 0) override; - /** Uses QueryOption_Exhaust, when available. + /** Uses QueryOption_Exhaust, when available and specified in 'queryOptions'. Exhaust mode sends back all data queries as fast as possible, with no back-and-forth for - OP_GETMORE. If you are certain you will exhaust the query, it could be useful. + OP_GETMORE. If you are certain you will exhaust the query, it could be useful. If + exhaust mode is not specified in 'queryOptions' or not available, this call transparently + falls back to using ordinary getMores. Use the DBClientCursorBatchIterator version, below, if you want to do items in large blocks, perhaps to avoid granular locking and such. @@ -606,14 +608,14 @@ public: const NamespaceStringOrUUID& nsOrUuid, Query query, const BSONObj* fieldsToReturn = 0, - int queryOptions = 0, + int queryOptions = QueryOption_Exhaust, int batchSize = 0) final; unsigned long long query(stdx::function<void(DBClientCursorBatchIterator&)> f, const NamespaceStringOrUUID& nsOrUuid, Query query, const BSONObj* fieldsToReturn = 0, - int queryOptions = 0, + int queryOptions = QueryOption_Exhaust, int batchSize = 0) override; |