[SERVER-46581] mongo_embedded_test opens storage data files in the default dbpath (/data/db) Created: 03/Mar/20 Updated: 29/Oct/23 Resolved: 12/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Dev Tools 2020-03-23, Dev Platform 2021-02-22, Dev Platform 2021-03-08, Dev Platform 2021-03-22 | ||||||||
| Participants: | |||||||||
| Description |
|
When I run mongo_embedded_test, it appears open the default dbpath (/data/db) with the default (or detected) storage engine. It then closes that storage engine before proceeding with the unit test suites (which all use temporary locations for their dbpaths). This means that if you have corrupt or problematic files in /data/db, your unit test can fail, or worse, silently change the files. |
| Comments |
| Comment by Githook User [ 11/Mar/21 ] | |||||||||||||||||
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: | |||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 09/Feb/21 ] | |||||||||||||||||
|
This is directly caused by this part of the test in mongo_embedded_test.cpp:
The intention is to spin up an instance and ensure we get a logging callback. Since we didn't provide any configuration, the default is used. A fix should be straightforward. | |||||||||||||||||
| Comment by Eric Milkie [ 03/Mar/20 ] | |||||||||||||||||
|
Alternatively, we may end up deleting this test entirely. |