clj-commons / durable-queue

a disk-backed queue for clojure
Eclipse Public License 1.0
384 stars 31 forks source link

Deletes files that look like slabs #8

Open temochka opened 9 years ago

temochka commented 9 years ago

I had another process writing temporary files with names matching #"\w+_\d+" (2015_05_01_xxxxxx.zip) to the same ./tmp directory where durable-queue stored its slabs. After a while, I noticed those temporary files occasionally disappear before the worker process would get a chance to clean them up. Turned out, durable-queue was deleting them, thinking they were empty slabs.

While, I suppose, I shouldn’t have taken the /tmp example in README so seriously, at least it seems worth noting in the docs that the directory is better be dedicated to the process. A stricter regexp (i.e. #"^\w+_\d+$") could also help reduce the risk of collisions.

vedang commented 1 year ago

This issue can be safely closed as the code has been fixed in e59d0074360b10141f014753a9d1004c160c04ba and the change is available in durable-queue version 0.1.6.