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