Skip to content
Snippets Groups Projects
Commit b4eb2bf8 authored by Simon Künzel's avatar Simon Künzel
Browse files

Log exception on database commit conflict

parent b4a3cdc0
Branches
No related tags found
No related merge requests found
Pipeline #7607 passed
Pipeline: backend

#7608

    ...@@ -224,7 +224,7 @@ class Database: ...@@ -224,7 +224,7 @@ class Database:
    # Sleep a random time for up to 500ms to increase chance that next attempt succeeds (The randomness makes # 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) # 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) time.sleep(random.random() / 2)
    print("Warning: Reattempting transaction after commit conflict") print("Warning: Reattempting transaction after commit conflict", e)
    continue continue
    raise AssertionError("This should be unreachable code") raise AssertionError("This should be unreachable code")
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment