Alieh Saeedi created KAFKA-20307:
------------------------------------

             Summary: Add Interactive Queries (IQv1) support for headers-aware 
stores
                 Key: KAFKA-20307
                 URL: https://issues.apache.org/jira/browse/KAFKA-20307
             Project: Kafka
          Issue Type: Sub-task
            Reporter: Alieh Saeedi


 Problem

The new headers-aware state stores (TimestampedKeyValueStoreWithHeaders and 
TimestampedWindowStoreWithHeaders) cannot be queried using the existing 
Interactive Queries v1 (IQv1) API. Users attempting to query these stores via 
QueryableStoreTypes.keyValueStore() or 
QueryableStoreTypes.timestampedKeyValueStore() will fail because 
QueryableStoreTypes doesn't recognize headers-aware stores as valid store types
  2. State restoration doesn't know which format to use for headers-aware stores

  Proposed Solution

  Enable backward compatibility by:

  1. Store Type Recognition - Update QueryableStoreTypes to accept 
headers-aware stores
  2. Automatic Facade Wrapping - Modify GlobalStateStoreProvider and 
StreamThreadStateStoreProvider to wrap headers-aware stores with facades that 
strip headers/timestamps as needed
  3. Restoration Support - Add StateManagerUtil.converterForStore() to 
determine correct restoration format for any store type
  4. Read-Only Decorator - Add decorator for headers-aware stores to prevent 
writes during queries

  Expected Behavior

  Users can query headers-aware stores using existing IQv1 code without 
modifications:
  - keyValueStore() → returns plain values (headers and timestamps stripped)
  - timestampedKeyValueStore() → returns ValueAndTimestamp<V> (headers stripped)
  - windowStore() → returns plain values (headers and timestamps stripped)
  - timestampedWindowStore() → returns ValueAndTimestamp<V> (headers stripped)

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to