[
https://issues.apache.org/jira/browse/KAFKA-5771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16140853#comment-16140853
]
Guozhang Wang edited comment on KAFKA-5771 at 8/24/17 10:29 PM:
----------------------------------------------------------------
If I understands this correctly, this issue is dependent on the timestamps of
the messages received in this stateful operator: i.e. if we have messages
coming in whose timestamp have big gaps and hence would fall in non-consecutive
"bucket" (which will be calculated as {{timestamp / segmentInterval}}) this
issue will be triggered, is that right? [~radzish]
Your fix seems right to me. Could you open a PR following this process?
https://cwiki.apache.org/confluence/display/KAFKA/Contributing+Code+Changes#ContributingCodeChanges-PullRequest
was (Author: guozhang):
If I understands this correctly? This issue is dependent on the timestamps of
the messages received in this stateful operator: i.e. if we have messages
coming in whose timestamp have big gaps and hence would fall in non-consecutive
"bucket" (which will be calculated as {{timestamp / segmentInterval}}) this
issue will be triggered, is that right? [~radzish]
Your fix seems right to me. Could you open a PR following this process?
https://cwiki.apache.org/confluence/display/KAFKA/Contributing+Code+Changes#ContributingCodeChanges-PullRequest
> org.apache.kafka.streams.state.internals.Segments#segments method returns
> incorrect results when segments were added out of order
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-5771
> URL: https://issues.apache.org/jira/browse/KAFKA-5771
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 0.11.0.0
> Reporter: Alexander Radzishevsky
>
> following unit test in org.apache.kafka.streams.state.internals.SegmentsTest
> will fail
> {code:title=org.apache.kafka.streams.state.internals.SegmentsTest.java|borderStyle=solid}
> @Test
> public void shouldGetSegmentsWithinTimeRangeOutOfOrder() throws Exception
> {
> segments.getOrCreateSegment(4, context);
> segments.getOrCreateSegment(2, context);
> segments.getOrCreateSegment(0, context);
> segments.getOrCreateSegment(1, context);
> segments.getOrCreateSegment(3, context);
> final List<Segment> segments = this.segments.segments(0, 2 * 60 *
> 1000);
> assertEquals(3, segments.size());
> assertEquals(0, segments.get(0).id);
> assertEquals(1, segments.get(1).id);
> assertEquals(2, segments.get(2).id);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)