diff options
Diffstat (limited to 'src/mongo/db/query/find_common.cpp')
| -rw-r--r-- | src/mongo/db/query/find_common.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/mongo/db/query/find_common.cpp b/src/mongo/db/query/find_common.cpp index 0078533cc60..57f9f3954b2 100644 --- a/src/mongo/db/query/find_common.cpp +++ b/src/mongo/db/query/find_common.cpp @@ -133,17 +133,5 @@ std::size_t FindCommon::getBytesToReserveForGetMoreReply(bool isTailable, // command metadata to the reply. return kMaxBytesToReturnToClientAtOnce; } -bool FindCommon::BSONArrayResponseSizeTracker::haveSpaceForNext(const BSONObj& document) { - return FindCommon::haveSpaceForNext(document, _numberOfDocuments, _bsonArraySizeInBytes); -} -void FindCommon::BSONArrayResponseSizeTracker::add(const BSONObj& document) { - dassert(haveSpaceForNext(document)); - ++_numberOfDocuments; - _bsonArraySizeInBytes += (document.objsize() + kPerDocumentOverheadBytesUpperBound); -} -// Upper bound of BSON array element overhead. The overhead is 1 byte/doc for the type + 1 byte/doc -// for the field name's null terminator + 1 byte per digit of the maximum array index value. -const size_t FindCommon::BSONArrayResponseSizeTracker::kPerDocumentOverheadBytesUpperBound{ - 2 + std::to_string(BSONObjMaxUserSize / BSONObj::kMinBSONLength).length()}; } // namespace mongo |
