No, that behavior is different from what you recommend. We open (reopen) transaction when it was finished before. It means, that once we tried to acquire pause semaphore and it was locked (we can't acquire it), so we are in pause -- need to close transaction, release transaction semaphore, say that we finished transaction and wait here for "end" of pause. Then, if we finished transaction we must reopen it...

Otherwise, if we acquire pause semaphore in `DAO::pauseSemaphore().tryAcquire()`, we just move on and do not close transaction.