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

In-Memory state store backed by InMemoryKeyValueStore is slow due to synchronizing reads/writes using a single lock.

    XMLWordPrintableJSON

Details

    • Patch

    Description

      Default In-Memory state store (InMemoryKeyValueStore) uses TreeMap as the backing map implementation.  Read/write methods such as get() and put() are synchronized on the same lock hence significantly reducing multi-thread performance.

      https://github.com/a0x8o/kafka/blob/f834be5e73e46805b29df9845bf09be98f91fc09/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryKeyValueStore.java#L78

      Attachments

        Activity

          People

            gorsonw Ki Lok Wong
            gorsonw Ki Lok Wong
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified