public KafkaFuture<Uuid> globalConsumerInstanceId(final Duration timeout) {
        boolean setDeadline = false;

        if (clientInstanceIdFuture.isDone()) {
            if (clientInstanceIdFuture.isCompletedExceptionally()) {
                clientInstanceIdFuture = new KafkaFutureImpl<>();
                setDeadline = true;
            }
        } else {
            setDeadline = true;
        }

        if (setDeadline) {
            fetchDeadlineClientInstanceId = time.milliseconds() + timeout.toMillis();
        }

        return clientInstanceIdFuture;
    }
@throws IllegalStateException If store gets registered after initialized is already finished
@throws StreamsException      if the store's change log does not contain the partition
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java