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

Encapsulate size check in ReplyBuilderInterface::addOutputDocs

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.6
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Fully Compatible
    • Platform 6 07/17/15

      Change the ReplyBuilderInterface API to

      • make availableSpaceForOutputDocs private
      • change return type to StatusWith<std::size_t> for addOutputDoc(s)
        the value returned in status:
        Status::isOK will contain remaining space in the buffer.
        On the error client will have to either access the last successful status to get space left or try to add an empty BSONObj

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: