Build legacy bulk operation batches after connection checkout

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Bulk API
    • None
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a driver engineer,
      I want the legacy bulk API to build batches after connection checkout,
      So that we use accurate hello metadata for batching logic in load balanced mode.

      As a driver user,
      I want the legacy bulk API to build batches after connection checkout,
      So that I can use auto-connect with bulk write API.

      User Experience

      • Users will see errors related to document size when a bulk operation is executed instead of when the batch is constructed.

      Dependencies

      Risks/Unknowns

      • Bulk operations are used for insertMany - a critical code path. We should be careful to ensure performance does not regress when making this change.

      Acceptance Criteria

      Implementation Requirements

      • Instead of building batches of commands before executing a bulk operation, lazily build batches after connection checkout.
        • The client bulk write method already does this and could be used as an implementation reference.
      • Obtain relevant server metadata used in building batches from the checked out connection

      Testing Requirements

      • Ensure existing tests pass.

      Documentation Requirements

      • n/a

      Follow Up Requirements

      • n/a

              Assignee:
              Unassigned
              Reporter:
              Bailey Pearson
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: