PyMongo improperly clears the pool for an operation failure on hello

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: SDAM
    • 🔵 Done
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      The sdam spec specifies that errors encountered before the handshake is complete must only clear the pool if they are network timeout or authentication step errors.

      In pymongo's topology code, we clear the pool on any unknown operation failure occurring before the handshake, which includes the hello() message.

      I verified that there are no unified tests expecting this behavior, by removing that pool clear logic and finding that the only two failures occurred during the authentication step.

      https://spruce.mongodb.com/version/691b79cda6aa350007571a3d/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC.

      We should update the logic to distinguish between a failure during the authentication step and one during the hello message.

            Assignee:
            Unassigned
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: