|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
jkaluza commented 4 years ago | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
jkaluza commented 4 years ago There is no need to guard here, either the directory exists or not. If other process is in the phase of creating it and it has the directory locked, we will wait for that lock later when we try to use it. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
We use flufl.lock already in the mergerepo.py
to lock NFS directories. This just uses this also for KojiTagCache to guard access to cached directory in case multiple processes would try accessing it.
There is no need to guard creation of top-level cache_dir. If there is a race between two processes when creating it, the makedirs will simply return without any error, because EEXIST is catched there.