Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Error when creating custom write concern using tags
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
CS  
View profile  
 More options Oct 12 2012, 8:35 pm
From: CS <cslecl...@gmail.com>
Date: Fri, 12 Oct 2012 17:35:49 -0700 (PDT)
Local: Fri, Oct 12 2012 8:35 pm
Subject: Error when creating custom write concern using tags

Hi folks,

I'm having some trouble creating a custom write concern using tags in 2.0.7
and 2.2.0, I get the following error:

"errmsg" : "exception: mode { dc: 2.0 } requires 2 tagged with dc, but only
1 with this tag were found",

However, there is more than 2 dc tags in the config:
rs_intg:PRIMARY> rs.conf()
{
        "_id" : "rs_intg",
        "version" : 9,
        "members" : [
                {
                        "_id" : 0,
                        "host" : "mongo-test01v:27017",
                        "tags" : {
                                "dc" : "p"
                        }
                },
                {
                        "_id" : 1,
                        "host" : "mongo-test02v:27017",
                        "tags" : {
                                "dc" : "p"
                        }
                },
                {
                        "_id" : 2,
                        "host" : "mongo-test03v:27017",
                        "tags" : {
                                "dc" : "p"
                        }
                },
                {
                        "_id" : 3,
                        "host" : "mongo-test04v:27017",
                        "priority" : 0,
                        "hidden" : true,
                        "tags" : {
                                "backup" : "b"
                        }
                }
        ]

}

Trying to create the write concern:
rs_intg:PRIMARY> cfg = rs.conf()
...
rs_intg:PRIMARY> cfg.settings = { getLastErrorModes : { production : { dc:
2 } } }
{ "getLastErrorModes" : { "production" : { "dc" : 2 } } }
rs_intg:PRIMARY> rs.reconfig(cfg)
{
       * "errmsg" : "exception: mode { dc: 2.0 } requires 2 tagged with dc,
but only 1 with this tag were found",*
        "code" : 14831,
        "ok" : 0

}

But if I set it to 1, then it works:
rs_intg:PRIMARY> cfg.settings = { getLastErrorModes : { production : { dc:
1 } } }
{ "getLastErrorModes" : { "production" : { "dc" : 1 } } }
rs_intg:PRIMARY> rs.reconfig(cfg)
{ "ok" : 1 }

The status appears to be ok:
rs_intg:PRIMARY> rs.status()
{
        "set" : "rs_intg",
        "date" : ISODate("2012-10-13T00:27:21Z"),
        "myState" : 1,
        "members" : [
                {
                        "_id" : 0,
                        "name" : "mongo-test01v:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 182,
                        "optime" : {
                                "t" : 1350087984000,
                                "i" : 1
                        },
                        "optimeDate" : ISODate("2012-10-13T00:26:24Z"),
                        "lastHeartbeat" : ISODate("2012-10-13T00:27:20Z"),
                        "pingMs" : 0
                },
                {

                        "_id" : 1,
                        "name" : "mongo-test02v:27017",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 182,
                        "optime" : {
                                "t" : 1350087984000,
                                "i" : 1
                        },
                        "optimeDate" : ISODate("2012-10-13T00:26:24Z"),
                        "self" : true
                },
                {
                        "_id" : 2,
                        "name" : "mongo-test03v:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 152,
                        "optime" : {
                                "t" : 1350087984000,
                                "i" : 1
                        },
                        "optimeDate" : ISODate("2012-10-13T00:26:24Z"),
                        "lastHeartbeat" : ISODate("2012-10-13T00:27:20Z"),
                        "pingMs" : 1
                },
                {
                        "_id" : 3,
                        "name" : "mongo-test04v:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 126,
                        "optime" : {
                                "t" : 1350087984000,
                                "i" : 1
                        },
                        "optimeDate" : ISODate("2012-10-13T00:26:24Z"),
                        "lastHeartbeat" : ISODate("2012-10-13T00:27:20Z"),
                        "pingMs" : 0,
                        "errmsg" : "syncing to: mongo-test02v:27017"
                }
        ],
        "ok" : 1

}

Any suggestions appreciated, thanks!

cs


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.