-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.6.5
-
Component/s: Replication
-
Labels:None
-
ALL
Certain keys which are technically invalid in MongoDB can still be inserted into the database and save validly.
However, they will choke the replication system and cause all secondaries' attempts to replicate that data to fail.
By way of example, Java Drivers prior to version 2.4 allowed insert with an arbitrary made-up "$" operator field name, which will insert correctly but fail on replication as evinced in CS-1059.
Using a release of Casbah linked against Java Driver 2.3, I can insert the following:
scala> m.insert(MongoDBObject("_id" -> MongoDBObject("$uid" -> "OMGWTFBBQ")))
res1: com.mongodb.WriteResult =
Which shows up in MongoDB as:
> db.omgPonies.find()
{ "_id" :
}
Replica members will, however, report an error when trying to replicate the oplog entry for the insert along the lines of "[rs_sync] replSet syncThread: 10068 invalid operator: $uid "