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

Iterating over cache with get(key) is inefficient

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: streams
    • Labels:

      Description

      Currently, range queries in the caching layer are implemented by creating an iterator over the subset of keys in the range, and calling get() on the underlying TreeMap for each key. While this protects against ConcurrentModificationException, we can improve performance by replacing the TreeMap with a concurrent data structure such as ConcurrentSkipListMap and then just iterating over a subMap.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ableegoldman Sophie Blee-Goldman
                Reporter:
                ableegoldman Sophie Blee-Goldman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: