Retry on deadlock

Related products: Software Factory Windows GUI Universal GUI Indicium Service Tier

When a user currently encounters a deadlock and she is chosen as the deadlock-victim, the user gets a message asking to rerun the transaction.

Solving (frequent) deadlocks is something a developer should do, but they still can happen. Often, when a user retries to run the transaction, the problem has gone away.

I’d like to propose a client side (GUI/Indicium) solution that will re-try the transaction without the user intervening. This way, the user is not seeing a technical message regarding the deadlock and the action the user wanted to make still pulls trough.

I would implement this as follows (my suggestion)

  • Store a setting in SF specifying the amount of deadlock retries (default = 5)
  • GUI/Indicium:
    • Retry the transaction as many times as specified in SF (with an appropriate wait-time)
    • When a deadlock occurs, store the deadlock graph XML in a deadlock-log table in IAM
    • Write to logfile a deadlock has occured (warning)

The advantage to this solution is two-fold:

  • The user can (mostly) continue their work and is not bothered by ‘scary’ deadlock messages
  • The developer/administrator has insight in how many deadlocks happen and has got a log of deadlock graphs to look at.
Updated idea status NewOpen

Bump ;-)

Especially for indicium, since we are using more and more system flows now. Sql server returns an error message 1205 in case of a deadlock but this remains unseen since it is only stored in the indicium logs. Users will not be aware of the deadlock.