21540: Start a transaction in update_priorities 21540-priority-update-deadlock
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 28 Oct 2024 14:11:36 +0000 (10:11 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 28 Oct 2024 14:11:36 +0000 (10:11 -0400)
commit124ffe90c721838f8d6004b7066abadf6011e5d5
tree11cb7dfd7029013b51248cba3ff41f3660bd9181
parent78e23aba707bf8d8324c045c1fdf120c2e9bc082
21540: Start a transaction in update_priorities

It is harmless if we are already in a transaction.

It's possible that not being in a transaction could be a root cause of
the deadlocks.  If it is not in a transaction when it does the ordered
locking, then the locks would be released immediately, and the update
priority update query would re-take the locks in arbitrary order.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
services/api/lib/update_priorities.rb