[SERVER-3530] Certain types of invalid keys which buggy drivers permit (such as invalid $ operators) can save in server validly, but choke replication Created: 03/Aug/11 Updated: 10/Dec/14 Resolved: 23/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 1.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brendan W. McAdams | Assignee: | Matt Dannenberg |
| Resolution: | Cannot Reproduce | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
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"))) Which shows up in MongoDB as: > db.omgPonies.find() } 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 " |
| Comments |
| Comment by Matt Dannenberg [ 23/May/13 ] |
|
This bug is for a very old version at this point and I was unable to reproduce it on the current version with the C++ driver. |
| Comment by Allen Jensen [ 02/Aug/12 ] |
|
|