Fix infinite loop in OStoreDB
Summary
When running getNextRetrieveJobsToReportBatch
the code first fetches the object store for JobsToReportToUser
queue and after that it enters in a loop where it tries to get information from the first element in the list of queues. As we don't refetch that information inside the loop if the first queue is removed from the object store before we try to pop the next batch from it, we will end in an infinite loop. This can also happen for getNextRetrieveJobsFailedSummary
.
Interestingly, this problem also happened 4 years ago and got partially fixed (2 of the loops where not updated): 3fdecebc
What is the current bug behaviour?
Ifinite loop.
What is the expected correct behaviour?
No infinite loop, by refetching the information from the OStore.
Relevant logs and/or screenshots
For more details see: https://gitlab.cern.ch/cta/operations/-/issues/1323