public UnSortedDupKey<K> createUnsortedKey(final K key) {
            final UnsignedLong newId = idRef.updateAndGet(unsignedLong ->
                    unsignedLong == null
                            ? new UnsignedLong(0, idByteLength)
                            : unsignedLong.increment());
            return new UnSortedDupKey<>(key, newId);
        }
Each call to this will return a {@link UnSortedDupKey} with a unique id part
ensuring that duplicate keys are unique.
stroom-lmdb/src/main/java/stroom/lmdb/UnSortedDupKey.java