pull-requests: optimize db transaction logic....
pull-requests: optimize db transaction logic.
- we've been investigating this issue with locked pull-requests
- the transactions arround audit-logs and state-lock seems to be fragile for long-running, and exception prone setups
- this change tries to make use of few snapshot transactions to prevent a long ones, and actually try to recover on failed audit-log calls.