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

Fix logic for applying the final write concern to the final bulkWrite batch

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.11
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • 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 client_bulk.py, the following logic is used to determine whether to use the final write concern (set to w=0 in the case of unacknowledged bulk writes) for the final bulkWrite server command. However, this condition does not represent the final bulkWrite batch. For example, if there are 10 InsertOne ops of size 16MB then this condition is true, but multiple batches are still required.

      while self.idx_offset < self.total_ops:            
      # If this is the last possible batch, use the final write concern.            
          if self.total_ops - self.idx_offset <= bwc.max_write_batch_size: 
              write_concern = final_write_concern or write_concern

       

       

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

              Created:
              Updated: