Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
47cfe8b1
Commit
47cfe8b1
authored
Apr 16, 2019
by
Eric Cano
Browse files
Added a delay to queue deletions to avoid live lock seen in CI.
parent
7bb51f1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
objectstore/RootEntry.cpp
View file @
47cfe8b1
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment