transactions and locks: use `with` rather than `try`/`finally`

24 jobs for topic/default/drop-pre-4.4 in 7 minutes and 55 seconds (queued for 1 second)
latest