[SERVER-21680] Cannot drop oplog.$main Created: 26/Nov/15 Updated: 07/Jan/16 Resolved: 07/Jan/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin, Replication |
| Affects Version/s: | 3.0.6 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Marek Jurco | Assignee: | Stennie Steneker (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
After converting master/slave replication to replica set (as described on https://docs.mongodb.org/manual/core/master-slave/#convert-a-master-slave-deployment-to-a-replica-set), I cannot drop local.oplog.$main collection: Error: drop failed: { "ok" : 0, "errmsg" : "can't drop collection with reserved $ character in name" }I need to drop it since Could you please advise on how to drop it? Thank you. |
| Comments |
| Comment by Stennie Steneker (Inactive) [ 27/Nov/15 ] |
|
Hi Marek, It looks like the procedure for converting a master/slave deployment to a replica set is missing a step to remove the local database before initiating the replica set. Since newer versions of the MongoDB server have stronger enforcement for collection name validation, there isn't a straightforward way to drop or rename local.oplog.$main because it includes a reserved character ($). A suggested workaround is to re-sync a replica set member that still has the old local.oplog.$main collection. Regards, |