public boolean delete(final Txn<ByteBuffer> writeTxn, final K key) {
        try (final PooledByteBuffer pooledKeyBuffer = getPooledKeyBuffer()) {
            final ByteBuffer keyBuffer = pooledKeyBuffer.getByteBuffer();
            serializeKey(keyBuffer, key);
            boolean result = lmdbDbi.delete(writeTxn, keyBuffer);
            LOGGER.trace("delete({}) returned {}", key, result);
            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