Encapsulate size check in ReplyBuilderInterface::addOutputDocs

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: