From b4eb2bf8d89d11e995c514e9de4afe9b03754e5e 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 01:41:51 +0200 Subject: [PATCH] Log exception on database commit conflict --- common_py/src/videoag_common/database/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_py/src/videoag_common/database/database.py b/common_py/src/videoag_common/database/database.py index a208f2e..f8b2678 100644 --- a/common_py/src/videoag_common/database/database.py +++ b/common_py/src/videoag_common/database/database.py @@ -224,7 +224,7 @@ class Database: # Sleep a random time for up to 500ms to increase chance that next attempt succeeds (The randomness makes # it more likely that we reattempt at a different time than the one with which we are in conflict right now) time.sleep(random.random() / 2) - print("Warning: Reattempting transaction after commit conflict") + print("Warning: Reattempting transaction after commit conflict", e) continue raise AssertionError("This should be unreachable code") -- GitLab