kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Radzishevsky (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-5771) org.apache.kafka.streams.state.internals.Segments#segments method returns incorrect results when segments were added out of order
Date Wed, 23 Aug 2017 14:04:00 GMT
Alexander Radzishevsky created KAFKA-5771:
---------------------------------------------

             Summary: 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)

Mime
View raw message