Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18929

Add method to get how many bytes can be written in to ReplyBuilderInterface

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.5
    • None
    • Networking
    • None
    • Minor Change
    • Platform 5 06/26/16

    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

      Attachments

        Activity

          People

            misha.tyulenev@mongodb.com Misha Tyulenev
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: