[SERVER-2714] RS hidden setting should treat 1 as true Created: 09/Mar/11  Updated: 12/Jul/16  Resolved: 17/Mar/11

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.8.0-rc1
Fix Version/s: 1.8.1, 1.9.0

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Currently it is just silently ignored

rs.reconfig( {_id: 'rs', members: [{_id:0, host:'50.56.91.235'}, {_id:1,host:'50.56.91.254'}, {_id:2, host:'50.56.91.222', hidden:1, priority:0}]})

rs:PRIMARY> rs.isMaster()
{
"setName" : "rs",
"ismaster" : true,
"secondary" : false,
"hosts" : [
"50.56.91.254",
"50.56.91.235"
],
"passives" : [
"50.56.91.222"
],
"maxBsonObjectSize" : 16777216,
"ok" : 1
}

> rs.initiate( {_id: 'rs', members: [{_id:0, host:'50.56.91.235'}, {_id:1,host:'50.56.91.254'}, {_id:2, host:'50.56.91.222', hidden:true, priority:0}]})
{
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
> rs.isMaster()
{
"setName" : "rs",
"ismaster" : true,
"secondary" : false,
"hosts" : [
"50.56.91.254",
"50.56.91.235"
],
"maxBsonObjectSize" : 16777216,
"ok" : 1
}



 Comments   
Comment by auto [ 19/Mar/11 ]

Author:

{u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}

Message: allow 1 or true for rs config options SERVER-2714
https://github.com/mongodb/mongo/commit/010e692d652ada892e57b3ae976dc13a4f31f06e

Comment by auto [ 17/Mar/11 ]

Author:

{u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}

Message: allow 1 or true for rs config options SERVER-2714
https://github.com/mongodb/mongo/commit/ead5ec842d2b43fa57ef98acbf5b1f18c2117367

Comment by Eliot Horowitz (Inactive) [ 09/Mar/11 ]

Should use .trueValue() for all things like this.

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