[SERVER-9321] Empty database when recreate in replicate set with priority Created: 11/Apr/13 Updated: 16/Nov/21 Resolved: 11/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Verdejo | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | database, empty, priority, replicaset | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Thu Apr 11 11:52:11 [initandlisten] db version v2.2.4, pdfile version 4.5 |
||
| Operating System: | Windows |
| Steps To Reproduce: | Replica Set configuration: , , { "_id" : 2, "host" : "log-mng23:27018", "arbiterOnly" : true } ] Stop MongoDB service, delete database folder and then restart the service again. |
| Participants: |
| Description |
|
I tried to recreate a database on one node of the replica set (this node has more priority than others). I stopped the service and deleted the database folder. Then I started the service again but mongod have created an empty database and the node became primary to the replica set, meanwhile others nodes keeeped their database without problems. |
| Comments |
| Comment by David Verdejo [ 11/Apr/13 ] |
|
I delete database folder, not all files from dbpath. Sorry and I lot of thanks for your help. |
| Comment by Scott Hernandez (Inactive) [ 11/Apr/13 ] |
|
Did you delete all database and mongodb files? It sounds like from your description that you did not delete the local database files. |
| Comment by David Verdejo [ 11/Apr/13 ] |
|
I followed the guide to resync a replica set (Automatically Resync a Stale Member): http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/ |
| Comment by Scott Hernandez (Inactive) [ 11/Apr/13 ] |
|
Any operations done when the node is not a primary (in replica set mode) will not be recorder or replicated. What you have done is not suggested or supported for a replica set node for anything other than system maintenance. If you want to drop a database you must do this from the primary while it is active via the mongodb commands. |