The parallel replication feature (MDEV-4506) has some potentially long-running
waits, when a transaction in one worker thread waits for another to commit.
These waits are currently not killable. This is especially a problem if the
waits end up deadlocked on one another, which can happen if the parallel
replication feature is used incorrectly.
All relevant waits need to be implemented in a way that allows them to be
killed. And in case of kill, the code needs to handle the error and correctly
roll back the killed transaction and so on.