Backport "Deadlock on rpm repository pulp2pulp sync"to 3.14.z
Added by ggainey about 2 years ago
Fix occasional deadlocks when doing multiple similar syncs concurrently.
Forcing deadlocks requires a lot of time and pulpcore-workers running. There is therefore no specific CI test for this, but there is a reproducer script that will force deadlocks to happen (and show that they're fixed) here:
(cherry picked from commit 6af3519b4931bd34c49653a80c52fd1c7cd08821)