Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5536

Support multiple payloads in CommandMessage#getCommandDocument

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: Internal, Wire Protocol
    • None
    • Fully Compatible
    • Java Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The method CommandMessage#getCommandDocument assumes there is only one additional Kind 1 (Document Sequence) Section in an OP_MSG. But in the new bulk write API there will be two such sections, one for ops and one for nsInfo. And in general, OP_MSG supports any number of Kind 1 Sections.

      Let's change this method to support any number of Document Sequence Sections so that it will work properly with the new bulk write API, and any future changes that may require more than two Document Sequence Sections.

      This will require some refactoring of ByteBufBsonDocument as well.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: