Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21236

Existing replset node started with --configsvr will update config automatically

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.2.0-rc3
    • 3.2.0-rc1
    • Replication, Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding C (11/20/15)

    Description

      When loading the existing config it is updated to have "configsvr:true" in addition to the stored values. This causes the node to not error when starting like would happen if the replica set was sent a non-configsvr config during initiation or on a reconfig.

      > rs.conf() // In memory config, after loading
      {
      	"_id" : "test",
      	"version" : 3,
      	"configsvr" : true,
      	"protocolVersion" : NumberLong(1),
      	"members" : [
      		{
      			"_id" : 0,
      			"host" : "alias:7788",
      			"arbiterOnly" : false,
      			"buildIndexes" : true,
      			"hidden" : false,
      			"priority" : 1,
      			"tags" : {
      				
      			},
      			"slaveDelay" : NumberLong(0),
      			"votes" : 1
      		}
      	],
      	"settings" : {
      		"chainingAllowed" : true,
      		"heartbeatIntervalMillis" : 2000,
      		"heartbeatTimeoutSecs" : 10,
      		"electionTimeoutMillis" : 5000,
      		"getLastErrorModes" : {
      			
      		},
      		"getLastErrorDefaults" : {
      			"w" : 1,
      			"wtimeout" : 0
      		}
      	}
      }
      > db.getSiblingDB("local").system.replset.findOne() // actual stored config
      {
      	"_id" : "test",
      	"version" : 3,
      	"protocolVersion" : NumberLong(1),
      	"members" : [
      		{
      			"_id" : 0,
      			"host" : "alias:7788",
      			"arbiterOnly" : false,
      			"buildIndexes" : true,
      			"hidden" : false,
      			"priority" : 1,
      			"tags" : {
      				
      			},
      			"slaveDelay" : NumberLong(0),
      			"votes" : 1
      		}
      	],
      	"settings" : {
      		"chainingAllowed" : true,
      		"heartbeatIntervalMillis" : 2000,
      		"heartbeatTimeoutSecs" : 10,
      		"electionTimeoutMillis" : 5000,
      		"getLastErrorModes" : {
      			
      		},
      		"getLastErrorDefaults" : {
      			"w" : 1,
      			"wtimeout" : 0
      		}
      	}
      }
      
      

      Attachments

        Activity

          People

            spencer@mongodb.com Spencer Brody (Inactive)
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: