Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9419

Integer Overflow Possible with CircularIterator

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.2, 2.6.0, 2.4.2, 2.5.1
    • None
    • None

    Description

      Very unlikely to happen, but as someone that gets called in when something goes wrong, I'd like to remove as many possibilities as possible.

       

      https://github.com/apache/kafka/blob/8c21fa837df6908d9147805e097407d006d95fd4/clients/src/main/java/org/apache/kafka/common/utils/CircularIterator.java#L39-L43

       

      Also, the current implementation will work with a LinkedList, but it won't work well.  The constant call to `get` will perform at O(n^2).  Using an iterator instead allows other Collections to work reasonably well.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: