Open
Description
If two processes are racing to make the same final file:
rename /run/notifydedup/counter.json.part /run/notifydedup/counter.json: no such file or directory; also failed removing temp file: remove /run/notifydedup/counter.json.part: no such file or directory
Think timeline:
- Process 1 starts producing
counter.json.part
- Process 2 starts producing
counter.json.part
, overriding first one - Process 1 renames the part file to target (thinking it is its own part file), effectively replacing the target file with an incomplete file
Is it possible to use locking with the part file in a way that two competing processes are not racing to produce the target file?