Github user HeartSaVioR commented on a diff in the pull request: https://github.com/apache/storm/pull/1851#discussion_r99265466 --- Diff: external/storm-kafka/src/jvm/org/apache/storm/kafka/PartitionManager.java --- @@ -199,7 +199,12 @@ private void fill() { try { msgs = KafkaUtils.fetchMessages(_spoutConfig, _consumer, _partition, offset); } catch (TopicOffsetOutOfRangeException e) { - offset = KafkaUtils.getOffset(_consumer, _partition.topic, _partition.partition, kafka.api.OffsetRequest.EarliestTime()); + long partitionLatestOffset = KafkaUtils.getOffset(_consumer, _partition.topic, _partition.partition, kafka.api.OffsetRequest.LatestTime()); + if (partitionLatestOffset < offset) { + offset = partitionLatestOffset; + } else { + offset = KafkaUtils.getOffset(_consumer, _partition.topic, _partition.partition, kafka.api.OffsetRequest.EarliestTime()); + } // fetch failed, so don't update the fetch metrics //fix bug [STORM-643] : remove outdated failed offsets --- End diff -- @danny0405 @harshach Sorry My bad. I found that I confused earliest and latest... We're good to go.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---