Skip to content

createDirectoryIfMissing should be atomic

If I run createDirectoryIfMissing many times in parallel, it sometimes fails because (presumably) somewhere between the check if the directory exists, and between the actual creation, something else creates the directory.

Right now my workaround is to catch exceptions with isAlreadyExistsErrors

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/directory
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information