[SERVER-60887] Retry directory destruction in ResetDbpath Created: 21/Oct/21  Updated: 29/Oct/23  Resolved: 08/Nov/21

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

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-44553 Have the shell ResetDbpath helper be ... Closed
is related to SERVER-60871 Create directory as link on Windows f... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2021-11-15
Participants:
Linked BF Score: 40

 Description   

The ResetDbpath shell helper is used to destroy old database paths created by the integration tests.

Unfortunately, sometimes calls to boost::filesystem::create_directory appear to fail spuriously on Windows. This is likely due to file handles remaining active in the kernel, either because of some background job, or because cleanup takes longer than expected. We had previously experienced faults while performing boost::filesystem::remove_all, but resolved that by retrying errors on Windows in SERVER-44553.

While there are likely more comprehensive solutions, they would likely be more expensive to implement and maintain. We should investigate whether a simple retry would meet our needs.



 Comments   
Comment by Githook User [ 08/Nov/21 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-60887 Retry delete and create directory in resetDBPath
Branch: master
https://github.com/mongodb/mongo/commit/3727aa92af4acca138262f8163c0cdf52545b563

Comment by Spencer Jackson [ 21/Oct/21 ]

This is a potential alternative to SERVER-60871.

Generated at Thu Feb 08 05:50:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.