Open AnyOldName3 opened 7 months ago
Yeah, that does happen sometimes, but I guess I didn't think it was a significant problem. Based on a cursory search, I think this would be fixed by using lsof
to check if the file is being written to so that write operations aren't executed simultaneously?
Some race conditions also occur with the .txt files, e.g. sometimes two different processes try to rm lock.txt
at the same time, but I don't know if that causes adverse effects.
In a
success-json.log
file produced by this script, I foundIt looks like one JSON object was written in the middle of another, as if two threads were appending to the same file at once.