mbr / simplekv

A simple key-value store for binary data.
http://simplekv.readthedocs.io
MIT License
152 stars 50 forks source link

Be resilient against parallel directory creations. #75

Closed xhochy closed 6 years ago

xhochy commented 6 years ago

When using multiprocessing, simultaneous writes can lead to the situation where both code paths first check if the directory exists and create it in the negative case. As check and creation aren't a single atomic operation, one of them might fail.

xhochy commented 6 years ago

Failures in Travis are unrelated (minio does not start)

criemen commented 6 years ago

Fixed the problem with minio on master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-8.4%) to 81.182% when pulling 3d9f53d62801bc041ce3181692d521541d656782 on xhochy:ensure-thread-safety-makedirs into 599788b5c6c71e4a876f4319b9ca7a1ff1b9104d on mbr:master.

xhochy commented 6 years ago

Rebased and Travis is happy. The decrease in coverage seems to be down to the Azure tests being skipped, this should be irrelevant for this branch.

xhochy commented 6 years ago

Rebased and added changelog entry.