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

MongoReplicaSetClient should refresh immediately if we detect a secondary is recovering.

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

      If a secondary is in STARTUP2 or RECOVERING state it is still listed in the 'hosts' field of the ismaster response. Both the 'ismaster' and 'secondary' fields of the response will be set to False, so a monitor run will remove the member from the reader pool (or not, see PYTHON-455).

      repl0:RECOVERING> db.adminCommand('ismaster')
      {
      	"setName" : "repl0",
      	"ismaster" : false,
      	"secondary" : false,
      	"hosts" : [
      		"behackett-dt:27019",
      		"behackett-dt:27018",
      		"behackett-dt:27017"
      	],
      	"primary" : "behackett-dt:27017",
      	"me" : "behackett-dt:27019",
      	"maxBsonObjectSize" : 16777216,
      	"ok" : 1
      }
      

      Unfortunately the monitor only runs every 30 seconds. We should schedule an immediate refresh of the pools in helpers._unpack_response or helpers._check_command_response if we get an error message like "node is recovering" or "not master ...".

      NOTE: PYTHON-455 must be fixed first, or this change will make no difference.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: