Commit Graph

1 Commits

Author SHA1 Message Date
Matthew Treinish c09d157960
Add external lock to image cache sqlite driver db init
This commit adds an external lock to sqlite when launching multiple
worker processes (using uwsgi) the db init will fail for one since the 2
workers will race for initializing the DB. The method is idempotent so
we can safely run it twice in succession, but the lock is necessary to
provides us protection against running it at the same time.

Depends-On: I9a66a8636d12037ff9aa4fb73cc3f9b9343dd7e9
Change-Id: I654c3a5604a89402ba94d9cea44699a48583a7e0
2017-06-18 03:52:18 -04:00