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

Improve synchronization in CachingKeyValueStore methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • streams
    • None

    Description

      Currently CachingKeyValueStore methods are synchronized at method level.

      It seems we can use read lock for getter and write lock for put / delete methods.

      For getInternal(), if the underlying thread is streamThread, the getInternal() may trigger eviction. This can be handled by obtaining write lock at the beginning of the method for streamThread.

      Attachments

        1. 6412-jmh.v1.txt
          26 kB
          Ted Yu
        2. k-6412.v1.txt
          6 kB
          Ted Yu

        Issue Links

          Activity

            People

              tedyu Zhihong Yu
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: