krobertson / deb-s3

Easily create and manage an APT repository on S3 -- NO LONGER MAINTAINED
MIT License
482 stars 148 forks source link

Ensure only one lock is written #148

Closed ctompkinson closed 2 years ago

ctompkinson commented 6 years ago

There was an issue where two deb-s3 processes could write a lock file and continue to upload losing one the packages they were kicked off in the same time frame. This was relatively common when running concurrent CI builds.

To solve this I added a read check once a package is written so that it checks if it successfully holds the lock, using a random string to avoid instances where this happens on the same host.

ctompkinson commented 6 years ago

Saw the test failures, will push a fix