[SERVER-2461] in directoryperdb mode, database _tmp removed on startup Created: 01/Feb/11  Updated: 06/Dec/22  Resolved: 16/Nov/16

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

> use _tmp;
switched to db _tmp
Tue Feb 1 14:31:39 trying reconnect to 127.0.0.1
Tue Feb 1 14:31:39 reconnect 127.0.0.1 ok
> db.c.save( {} );
> db.c.count();
1
> db.c.count();
Tue Feb 1 14:31:50 DBClientCursor::init call() failed
Tue Feb 1 14:31:50 query failed : _tmp.$cmd { count: "c", query: {}, fields: {} } to: 127.0.0.1
Tue Feb 1 14:31:50 Error: error doing query: failed shell/collection.js:150
Tue Feb 1 14:31:50 trying reconnect to 127.0.0.1
Tue Feb 1 14:31:50 reconnect 127.0.0.1 ok
> db.c.count();
0
>

The mongod was restarted before the 2nd count() above.



 Comments   
Comment by Zhang Youdong [ 18/Oct/19 ]

I think mongd should forbid user to create _tmp database, it will crash the database after restart two times and lost all the data in _tmp.

Comment by Eliot Horowitz (Inactive) [ 02/Feb/11 ]

We should never allow a _tmp database.

Generated at Thu Feb 08 03:00:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.