Build legacy bulk operation batches after connection checkout

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Bulk API
    • None
    • 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 do not need to be connected to build bulk operations using the legacy 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: