Hello.

When migrating to 1.1.0 I faced with changed
behavior: KafkaConsumer.endOffsets can return partial data.

As I see it was introduced with KAFKA-6397 (Consumer should not block
setting initial positions of unavailable partitions).

There is strange code
at org.apache.kafka.clients.consumer.internals.Fetcher#sendListOffsetsRequests.

        Map<Node, Map<TopicPartition, Long>> timestampsToSearchByNode =
groupListOffsetRequests(timestampsToSearch);
        if (timestampsToSearchByNode.isEmpty())
            return RequestFuture.failure(new StaleMetadataException())

But groupListOffsetRequests will omit any partition that does not have a
leader.
It seems strange to raise StaleMetadataException if no partition available
but does not raise if only some of them are available.

Let's consider either always raise StaleMetadataException if at least one
partition unavailable or always succeed this method.

Thank you.

Feodor Bobin

Reply via email to