void deletePair(final Txn<ByteBuffer> writeTxn,
                    final UID mapUid) {
        LOGGER.trace("deletePair({})", mapUid);

        final ByteBuffer mapDefinitionBuffer = mapUidReverseDb.getAsBytes(
                        writeTxn,
                        mapUid.getBackingBuffer())
                .orElseThrow(() -> new RuntimeException(LogUtil.message(
                        "No entry exists for mapUid {}",
                        ByteBufferUtils.byteBufferInfo(mapUid.getBackingBuffer()))));

        // these two MUST be done in the same txn to ensure data consistency
        mapUidForwardDb.delete(writeTxn, mapDefinitionBuffer);
        mapUidReverseDb.delete(writeTxn, mapUid.getBackingBuffer());
    }
Returns the UID corresponding to the passed mapDefinition if it exists in the two mapping DBs. If it doesn't
exist, a forward and reverse mapping will be created and the new UID returned. The returned UID wraps a
direct allocation {@link ByteBuffer} owned by LMDB, so it may ONLY be used whilst still inside the passed
{@link Txn}.
stroom-pipeline/src/main/java/stroom/pipeline/refdata/store/offheapstore/MapDefinitionUIDStore.java