public void deleteAll(final Collection<K> keys) {
        lmdbEnvironment.doWithWriteTxn(writeTxn -> {
            try (final PooledByteBuffer pooledKeyBuffer = getPooledKeyBuffer()) {
                keys.forEach(key -> {
                    try {
                        final ByteBuffer keyBuffer = pooledKeyBuffer.getByteBuffer();
                        serializeKey(keyBuffer, key);
                        lmdbDbi.delete(writeTxn, keyBuffer);
                    } catch (Exception e) {
                        throw new RuntimeException(LogUtil.message("Error deleting key {}", key), e);
                    }
                });
            } catch (RuntimeException e) {
                throw new RuntimeException(LogUtil.message("Error deleting {} keys ", keys.size()), e);
            }
        });
    }
This will fail if you are already inside a txn.
stroom-lmdb/src/main/java/stroom/lmdb/AbstractLmdbDb.java