Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've recently promoted a new member to primary of a mongo replicaset. Things seem to be running smoothly for several days and am not seeing any application symptoms of any problems. However peeking at rs.status() today I noticed it's listing maintenanceMode -7. I didn't think this should be possible as it's the primary. I'm having trouble finding anything useful in the docs on what this means.

What does this mean?

    {
        "_id" : 26,
        "name" : "mongohost5:27032",
        "health" : 1,
        "state" : 1,
        "stateStr" : "PRIMARY",
        "uptime" : 106966,
        "optime" : Timestamp(1379627877000, 77),
        "optimeDate" : ISODate("2013-09-19T21:57:57Z"),
        "maintenanceMode" : -7,
        "self" : true
    }
share|improve this question
1  
I'm not 100% this is what's going on but this jira.mongodb.org/browse/SERVER-9338 seems related. If so, it sounds like a bug, not a feature. –  atxdba Sep 19 '13 at 23:00

1 Answer 1

up vote 1 down vote accepted

Maintenance mode is used when running certain commands, generally the compact command. What you have here is the bug mentioned in SERVER-9338 whereby I am guessing you have run the compact command against your nodes several times. There are some circumstances, especially when run on a primary when it will usually cause a change of state (i.e. it's not primary when the compact finishes), that cause maintenanceMode to be erroneously decremented.

As of writing this answer this is fixed in the development branch and has been marked for backport, though it has not (yet) been targeted for a release in the earlier versions. Until the fix is released it should be safe to ignore the value, but I will do some testing to confirm and report back.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.