You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "xijiu (via GitHub)" <gi...@apache.org> on 2025/04/28 12:49:05 UTC
Re: [PR] KAFKA-19205: inconsistent result of beginningOffsets/endoffset between classic and async consumer with 0 timeout [kafka]
xijiu commented on code in PR #19578:
URL: https://github.com/apache/kafka/pull/19578#discussion_r2063586929
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ListOffsetsEvent.java:
##########
@@ -47,13 +46,10 @@ public ListOffsetsEvent(Map<TopicPartition, Long> timestampToSearch,
/**
* Build result representing that no offsets were found as part of the current event.
*
- * @return Map containing all the partitions the event was trying to get offsets for, and
- * null {@link OffsetAndTimestamp} as value
+ * @return empty map
*/
public <T> Map<TopicPartition, T> emptyResults() {
- Map<TopicPartition, T> result = new HashMap<>();
- timestampsToSearch.keySet().forEach(tp -> result.put(tp, null));
- return result;
+ return Map.of();
Review Comment:
Sure, I have added it, PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org