From 36764524689b9290219eb406a4dca5b6db9ce311 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Aug 25 2023 13:44:56 +0000 Subject: Sort image rpm components before inserting Related: https://pagure.io/koji/issue/3637 A potential fix for a rare deadlock. This is the same thing we do in BuildRoot._setList() --- diff --git a/kojihub/kojihub.py b/kojihub/kojihub.py index 775cb5d..b821e16 100644 --- a/kojihub/kojihub.py +++ b/kojihub/kojihub.py @@ -10069,6 +10069,8 @@ def importImageInternal(task_id, build_info, imgdata): else: data = get_rpm(an_rpm, strict=True) rpm_ids.append(data['id']) + # we sort to try to avoid deadlock issues + rpm_ids.sort() # associate those RPMs with the image insert = BulkInsertProcessor('archive_rpm_components')