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

Avoid call fetchPrevious in FlushListeners

    XMLWordPrintableJSON

    Details

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

      Description

      When caching is turned on for a window or session store, upon store.put() the cache may gets flushed, trigger the dirty flush listener calling maybeForward(), which calls fetchPrevious().
      Unfortunately fetchPrevious() could be a very expensive call to make, and sometimes are not necessary:

      1. When KStreamWindowAggregate.process() already gets the previous value when aggregating, so we could passing the old value through the tuple forwarder without calling fetchPrevious again.
      2. When we know that sendOldValues flag is turned off.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bbejeck Bill Bejeck
                Reporter:
                guozhang Guozhang Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: