Allow BSONObjBuilder to append to existing BSONObj without copying

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.5.9
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Repl 2017-06-19, Repl 2017-07-10
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It should be able to reuse the SharedBuffer from an owned BSONObj as long as the ref count is 1, meaning that no other objects are using the same SharedBuffer. This addresses a common pattern in our code of needing to append a few fields to a BSONObj we just constructed.

              Assignee:
              Mathias Stearn
              Reporter:
              Mathias Stearn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: