[SERVER-3840] Inconsistent handling of arbiters with tags between rs.initiate() and rs.reconfig() Created: 14/Sep/11  Updated: 11/Jul/16  Resolved: 16/Sep/11

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.0.0
Fix Version/s: 2.1.0

Type: Bug Priority: Minor - P4
Reporter: Nick Miller Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: sharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos 5.4


Operating System: Linux
Participants:

 Description   

When using rs.initiate with a configuration object that contains an arbiter which has had a tag, configuration is saved successfully and replica set comes online. When reconfiguring using rs.reconfig the following error is generated:

{
"assertion" : "arbiters cannot have tags",
"assertionCode" : 14827,
"errmsg" : "db assertion failure",
"ok" : 0
}

The behaviour is inconsistent.

Here is an example configuration session (note host / shard names changed):

> cfg = {
"_id" : "shard-A",
"members" : [
{
"_id" : 0,
"host" : "host-1",
"priority" : 4,
"tags" :

{ "dc" : "east" }

,
"votes" : 1
},
{
"_id" : 1,
"host" : "host-2",
"priority" : 3,
"tags" :

{ "dc" : "east" }

,
"votes" : 1
},
{
"_id" : 2,
"host" : "host-3",
"priority" : 1,
"tags" :

{ "dc" : "west" }

,
"votes" : 1
},
{
"_id" : 3,
"host" : "host-4,
"priority" : 2,
"tags" :

{ "dc" : "west" }

,
"votes" : 1
},
{
"_id" : 99,
"host" : "host-5",
"tags" :

{ "dc" : "west" }

,
"votes" : 1,
"arbiterOnly" : true
}
]
};

> rs.initiate(cfg);
{
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}

> rs.reconfig(cfg,

{ force: true}

);
{
"assertion" : "arbiters cannot have tags",
"assertionCode" : 14827,
"errmsg" : "db assertion failure",
"ok" : 0
}



 Comments   
Comment by auto [ 16/Sep/11 ]

Author:

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

Message: check for tags on arbiter whenever a config is parsed SERVER-3840
Branch: master
https://github.com/mongodb/mongo/commit/5d714b1bee36b0fde44445b1e29bed6af7d7cc6c

Comment by Nick Miller [ 14/Sep/11 ]

I am assuming that as tags serve no purpose on arbiters, rs.initiate should also return the assertion that rs.reconfig produces.

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