CCCLL opened a new pull request, #23811:
URL: https://github.com/apache/kafka/pull/23811

   `kafka-get-offsets.sh` prints one `topic:partition:offset` line per
   partition. Since the tool was rewritten in Java (KAFKA-14581, 3.7.0)
   the lines are ordered by `TopicPartition.toString()`, that is by the
   string `topic-partition`, whereas the Scala version ordered them by
   topic and then by partition number. Partition 10 is therefore printed
   before partition 2, and the partitions of a topic can be interleaved
   with those of another topic. For a topic `a` with 12 partitions and a
   topic `a-1` with 2 partitions the output is:
   
       a:0:0
       a:1:0
       a-1:0:0
       a-1:1:0
       a:10:0
       a:11:0
       a:2:0
       ...
   
   Order the output by topic name and then by partition number again.
   
   The existing tests compare the output as an ordered list but only use
   topics with up to 4 partitions, so the new test uses a topic with 11
   partitions next to a topic named `foo-1`. It fails without the fix.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to