Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4596

Only encode each operation document once for MongoClient.bulk_write

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python 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?

      In constructing the OP_MSG for a bulkWrite server command, we should only need to bson encode each operation document once. This gets done in the function _client_batched_op_msg_impl in message.py. However, the calls to _check_doc_size_limits within _client_batched_op_msg_impl cause the operation doc to be encoded a second time.

            Assignee:
            shruti.sridhar@mongodb.com Shruti Sridhar (Inactive)
            Reporter:
            shruti.sridhar@mongodb.com Shruti Sridhar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: