Deadlock retries

Retry transaction on deadlock error.