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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.4.2
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: