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

pymongo 4.0+ hello.isWritablePrimary always returns True even when run against secondary instance

    XMLWordPrintableJSON

Details

    • Question
    • Status: Closed
    • Unknown
    • Resolution: Works as Designed
    • None
    • None
    • None

    Description

      pymongo 4.0+ hello.isWritablePrimary always returns True even when run against secondary instance

       

              doc = client.admin.command('hello')
              result = doc['isWritablePrimary'] 

      This does not happen when running db.hello() via mongo cli. This behaviour also does not happen in pymongo-3.12.3 but does happen 4.0+

      Some of our scripts rely on this critical flag to validate primaries and failed when using pymongo-4.0 to pymongo-4.1.1

       

      Attachments

        Issue Links

          Activity

            People

              shane.harvey@mongodb.com Shane Harvey
              rufus.shrestha@skyfii.com Rufus Shrestha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: