mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Because currently the lock in the script is retried every 1 second, and it's a quite a long time that it's possible for some other active script can be executed and retain the lock again. So it's possible that the first one request the lock is always being preemptted by others, then finally got timeout. To fix this issue, the retry interval is reduced to 0.1 seconds, which would provide more retry times. And each process want to get the lock would create a file named lockname-PID.lock, and only the first one(judged by timestamp) would get the lock. The remaining ones would retry every 0.1 seconds to see if it can get the lock. Also timeout time is extended to 30 seconds. And add testcase for it. status 11772: resolved fixed