[SERVER-21236] Existing replset node started with --configsvr will update config automatically Created: 31/Oct/15  Updated: 25/Jan/17  Resolved: 12/Nov/15

Status: Closed
Project: Core Server
Component/s: Replication, Sharding
Affects Version/s: 3.2.0-rc1
Fix Version/s: 3.2.0-rc3

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding C (11/20/15)
Participants:

 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
		}
	}
}



 Comments   
Comment by Githook User [ 12/Nov/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-21236 Don't automatically add 'configsvr':true to replset config when loading it from disk if started with --configsvr
Branch: master
https://github.com/mongodb/mongo/commit/f757a8bb463d5a3e7ca6e34f76b97000b9d9690e

Generated at Thu Feb 08 03:56:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.