[SERVER-19707] A crash after dropDatabase leaves the server unable to restart Created: 31/Jul/15 Updated: 06/Dec/22 Resolved: 14/Sep/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MMAPv1 |
| Affects Version/s: | 3.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Nelson Elhage | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: |
2015-07-31T22:40:06.247+0000 W - [initandlisten] Detected unclean shutdown - /tmp/mongo3/mongod.lock is not empty. |
||||||||||||
| Participants: | |||||||||||||
| Description |
|
dropDatabase syncs and truncates the journal, which can result in there being no journal files on disk. If the database crashes after dropDatabase and before any subsequent write operations (which would re-create the journal), on following startup, `mongod` will observe a `mongod.lock`, and no journal files, and assume that a non-journalled `mongod` crashed, and that the dbpath needs repair, even though it is in a completely consistent state thanks to the `sync`. We encounter this periodically on developer machines, since our application test suite drops databases after it runs, and it's not uncommon for a developer's mongod to see no other write traffic outside of tests. |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 03/Aug/15 ] |
|
Nelson, thanks for the report and detailed repro. |