From e54078f3006bd26522e07f37855e6d0239cc7aac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simon=20K=C3=BCnzel?= <simonk@fsmpi.rwth-aachen.de>
Date: Fri, 2 May 2025 02:53:10 +0200
Subject: [PATCH] Make sorter transaction REPEATABLE_READ

---
 job_controller/jobs/source_file_sorter/job.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/job_controller/jobs/source_file_sorter/job.py b/job_controller/jobs/source_file_sorter/job.py
index 0bba22a..a532c7d 100644
--- a/job_controller/jobs/source_file_sorter/job.py
+++ b/job_controller/jobs/source_file_sorter/job.py
@@ -292,6 +292,8 @@ def execute(database, own_job_id, input_data: CJsonObject):
         try:
             database.execute_write_transaction_and_commit(
                 _sort_file, own_job_id, db_path, on_transaction_failure,
+                isolation_level=TransactionIsolationLevel.REPEATABLE_READ
+                # Repeatable read as serializable often causes serialization conflicts
             )
         except Exception:
             if on_transaction_failure.func is not None:
-- 
GitLab