[SERVER-18929] Add method to get how many bytes can be written in to ReplyBuilderInterface Created: 11/Jun/15  Updated: 05/Feb/16  Resolved: 19/Jun/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Task Priority: Major - P3
Reporter: Adam Midvidy Assignee: Misha Tyulenev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-18930 Implement output doc downconversion i... Closed
Backwards Compatibility: Minor Change
Sprint: Platform 5 06/26/16
Participants:

 Description   

As OP_COMMANDREPLY can take ~48MB of output docs, and OP_REPLY (for commands) is limited to the 16MB document limit, commands that use output docs need to know when to stop appending documents to the response.

We should add a new method to ReplyBuilderInterface:

virtual std::size_t getRemainingSpaceInReply() const;

That returns how many bytes can be written to the message. Then we will need concrete implementations in CommandReplyBuilder (OP_COMMANDREPLY) and LegacyReplyBuilder (OP_REPLY)

cc: david.storch



 Comments   
Comment by Githook User [ 19/Jun/15 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-18929: Fix signed/unsigned comparisons in unittest
Branch: master
https://github.com/mongodb/mongo/commit/dde3a56fa71122a44b7bcc38f0d3f1047fc97f54

Comment by Githook User [ 19/Jun/15 ]

Author:

{u'name': u'Misha Tyulenev', u'email': u'misha.tyulenev@mongodb.com'}

Message: SERVER-18929: Compute available space for output docs in CommandReplyBuilder
Branch: master
https://github.com/mongodb/mongo/commit/8c56e2d96b98154b65e3889cd157e648df6ddf77

Generated at Thu Feb 08 03:49:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.