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

    • Type: Icon: Question Question
    • Resolution: Works as Designed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      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

       

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

              Created:
              Updated:
              Resolved: