Skip to content
Snippets Groups Projects
Commit 29461cb2 authored by Eric Cano's avatar Eric Cano
Browse files

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

parent 745ab37a
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment