You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently the return type documentation for the offsets_for_times function is:
Returns:
dict(TopicPartition, OffsetAndTimestamp): mapping from
partition to the timestamp and offset of the first message with
timestamp greater than or equal to the target timestamp.
a mapping from partition to the timestamp and offset of the first message with timestamp greater than
or equal to the target timestamp. null will be returned for the partition if there is no such message.
It is missing the returns None if there is no message that fulfils the timestamp condition. This is extra confusing because the function description includes a section stating:
If the message format version in a partition is before 0.10.0, i.e.
the messages do not have timestamps, ``None`` will be returned for that
partition.
The docs now say that None only happens if the cluster is dealing with an outdated message format. Rather than it being part of the normal interface.
Expected behaviour
The offsets_for_times documentations is brought in line with the kafka javadocs and the actual behaviour of the function.
Environment (please complete the following information):
aiokafka version: 0.12.0
Kafka Broker version (kafka-topics.sh --version): Not relevant
Other information (Confluent Cloud version, etc.): Not relevant
Describe the bug
Currently the return type documentation for the
offsets_for_times
function is:See https://aiokafka.readthedocs.io/en/stable/api.html#aiokafka.AIOKafkaConsumer.offsets_for_times
The most recent kafka javadocs for this function state:
See https://kafka.apache.org/38/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#offsetsForTimes(java.util.Map)
It is missing the returns None if there is no message that fulfils the timestamp condition. This is extra confusing because the function description includes a section stating:
The docs now say that
None
only happens if the cluster is dealing with an outdated message format. Rather than it being part of the normal interface.Expected behaviour
The
offsets_for_times
documentations is brought in line with the kafka javadocs and the actual behaviour of the function.Environment (please complete the following information):
kafka-topics.sh --version
): Not relevantReproducible example
Go to https://github.com/aio-libs/aiokafka/blob/master/aiokafka/consumer/consumer.py#L906 and see the docstring.
The text was updated successfully, but these errors were encountered: