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 have a replicaset that's showing multiple system.replset collection in the local db.

replset1:PRIMARY> show collections;
me
oplog.rs
replset.minvalid
slaves
system.indexes
system.profile
system.replset
system.replset

Running db.system.replset.find() returns the documents from both with out error.

They are different versions, one showing the current membership, another an older setup. I haven't seen this before. Is this expected?

I'm not really seeing any problems from the mongo or application side, this just seems strange. The duplicates are present on the primary and secondaries.

Should .remove({"version":}) be safe?

share|improve this question
    
I've never seen this before (well, I've seen multiple collections with the same name in a couple of Google Group posts, but nothing reproducible). It looks like a bug, assuming that there are no non-printable characters in one of the collection names. What version are you using? Does running .validate(true) (warning: blocking/intensive operation) on the local DB say there are errors? –  Adam C Oct 8 '13 at 11:35

1 Answer 1

I ran into this issue while trying to reconfigure my replicaset. db.system.replset.find().pretty() yielded two replicasets with different versions and different members. Running db.system.replset.remove({"version":199}) ended up removing the bad replicaset configuration. Reconfiguring my replicaset worked after that.

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.