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

Retryable reads/writes CommandStartedEvents publish duplicate command payloads

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Monitoring
    • None

      Some retryable reads/writes CommandStartedEvents publish duplicate command payloads. For example, the Collection.estimated_document_count code path constructs a command document, cmd = SON([('count', self.__name)]), and the initial attempt mutates this SON object and publishes it in a CommandStartedEvent. When the initial attempt fails and a retry is performed, it will mutate and publish the same SON object in the next CommandStartedEvent.

      This bug has minimal impact on end users since the two command attempts should be identical. However, this behavior undermines some assertions we make in our test suite and masks bugs like PYTHON-2390.

      To fix this bug we must ensure that the retry attempt uses a copy of the original command document.

            Assignee:
            Unassigned Unassigned
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: