Select is your friend.

Fix hypothetical deadlock when two high-volume partitions exchange leaders
simultaneously, by using select the way it was meant to be used.