Commit 47cfe8b1 authored by Eric Cano's avatar Eric Cano
Browse files

Added a delay to queue deletions to avoid live lock seen in CI.

parent 7bb51f1b
......@@ -233,6 +233,8 @@ void RootEntry::removeArchiveQueueAndCommit(const std::string& tapePool, JobQueu
ArchiveQueue aq (aqp.address(), m_objectStore);
ScopedExclusiveLock aql;
try {
// Give a slight grace period to avoid live locks (seen in CI: live lock between creation and deletion of empty queues).
std::this_thread::sleep_for (std::chrono::milliseconds(100));
aql.lock(aq);
aq.fetch();
} catch (cta::exception::Exception & ex) {
......@@ -370,6 +372,8 @@ void RootEntry::removeRetrieveQueueAndCommit(const std::string& vid, JobQueueTyp
RetrieveQueue rq(rqp.address(), m_objectStore);
ScopedExclusiveLock rql;
try {
// Give a slight grace period to avoid live locks (seen in CI: live lock between creation and deletion of empty queues).
std::this_thread::sleep_for (std::chrono::milliseconds(100));
rql.lock(rq);
rq.fetch();
} catch (cta::exception::Exception & ex) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment