GitHub user ZoneMayor opened a pull request:

    https://github.com/apache/kafka/pull/602

    Trunk kafka 2839

    I believe there is a bug in KafkaBasedLogTest implementation;
    Records are appended to "KafkaBasedLog" by :
    consumer.addRecord(new ConsumerRecord<>(TOPIC, 0, 0, TP0_KEY, TP0_VALUE));
    consumer.addRecord(new ConsumerRecord<>(TOPIC, 0, 1, TP0_KEY, 
TP0_VALUE_NEW));
    consumer.addRecord(new ConsumerRecord<>(TOPIC, 1, 0, TP1_KEY, TP1_VALUE));
    consumer.addRecord(new ConsumerRecord<>(TOPIC, 1, 1, TP1_KEY, 
TP1_VALUE_NEW));
    and achieved by "consumedRecords";
    Inside of "ConsumerRecords", in order to turn "records", which is a 
HashMap<TopicPartition, List<ConsumerRecord<K, V>>>, into 
Iterator<ConsumerRecord<K, V>>;
    We can just guarantee the sequence underneath same key, while we cannot 
assure the sequence under different keys;
    Am I wrong?
    @gwenshap 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ZoneMayor/kafka trunk-KAFKA-2839

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/602.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #602
    
----
commit 95374147a28208d4850f6e73f714bf418935fc2d
Author: ZoneMayor <jinxing6...@126.com>
Date:   2015-11-27T03:49:34Z

    Merge pull request #1 from apache/trunk
    
    merge

commit 0875176f90dbece21e1777902a079cf67ad157a7
Author: jinxing <jinx...@fenbi.com>
Date:   2015-11-30T03:39:29Z

    KAFKA-2839:  fix KafkaBasedLogTest testSendAndReadToEnd failing

----


---
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.
---

Reply via email to