public boolean delete(final ByteBuffer keyBuffer) {
        return lmdbEnvironment.getWithWriteTxn(writeTxn -> {
            try {
                boolean result = lmdbDbi.delete(writeTxn, keyBuffer);
                if (LOGGER.isTraceEnabled()) {
                    LOGGER.trace("delete({}) returned {}",
                            ByteBufferUtils.byteBufferInfo(keyBuffer),
                            result);
                }
                return result;
            } catch (RuntimeException e) {
                throw new RuntimeException(LogUtil.message("Error deleting key {}",
                        ByteBufferUtils.byteBufferInfo(keyBuffer)), e);
            }
        });
    }
This will fail if you are already inside a txn.
stroom-lmdb/src/main/java/stroom/lmdb/AbstractLmdbDb.java