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

AutoReconnect isn't

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • pymongo 1.9

    Description

      Either the Connection docs are wrong or AutoReconnect is seriously misnamed and spectacularly useless. If the former then please update the docs, and if the latter you may as well make it the same as ConnectionFailure.

      If I have to do as the docs state and wrap every pymongo operation with a try catch for AutoReconnect then exactly what is the benefit to me over a regular ConnectionFailure? Aren't I going to have to handle both anyway?

      About the only 'Auto' about this is that using the Connection again will result in another connection attempt which is no big deal.

      What I would expect is that connection issues are automatically retried (without raising an exception I have to handle) up to some number of attempts and timeout as specified in the Connection constructor. If that fails then raise ConnectionFailure.

      Attachments

        Activity

          People

            bernie@mongodb.com Bernie Hackett
            rogerbinns Roger Binns
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: