public WriteTxn openWriteTxn() {
        try {
            final Runnable postAcquireAction = LOGGER.isDebugEnabled()
                    ? createWaitLoggingAction("writeTxnLock")
                    : null;

            writeTxnLock.lockInterruptibly();

            if (postAcquireAction != null) {
                postAcquireAction.run();
            }

            LOGGER.trace("Opening new write txn");
            return new WriteTxn(writeTxnLock, env.txnWrite());
        } catch (final InterruptedException e) {
            throw UncheckedInterruptedException.create("Thread interrupted while waiting for write lock on "
                    + localDir.toAbsolutePath().normalize(), e);
        }
    }
@return An {@link AutoCloseable} wrapper round the open write txn that also releases
the single write lock. A call to this method will result in a write lock being obtained.
stroom-lmdb/src/main/java/stroom/lmdb/LmdbEnv.java