Muralidhar Basani created KAFKA-21521:
-----------------------------------------
Summary: Missing read-only window/session headers decorators in
AbstractReadOnlyDecorator.getReadOnlyStore
Key: KAFKA-21521
URL: https://issues.apache.org/jira/browse/KAFKA-21521
Project: Kafka
Issue Type: Improvement
Components: streams
Affects Versions: 4.4.0
Reporter: Muralidhar Basani
Assignee: Muralidhar Basani
Fix For: 4.5.0
When a processor reads a global store, Kafka Streams wraps it in a read-only
decorator that blocks writes. getReadOnlyStore chooses the decorator by
checking the store's type.
It has no check for the two headers store types,
TimestampedWindowStoreWithHeaders and SessionStoreWithHeaders. Those stores get
the plain window or session decorator instead, which drops the headers type.
Code that expects the headers store type gets a ClassCastException.
The read-write side (AbstractReadWriteDecorator.wrapWithReadWriteStore) already
handles both types. The read-only side should do the same.
{*}Fix{*}: add read-only decorators for the two headers store types and select
them in getReadOnlyStore. Then move the two test cases from
AbstractReadOnlyDecoratorTest.headersStoreTypesWithoutReadOnlyDecorator into
storeTypes.
gh thread - https://github.com/apache/kafka/pull/22992#discussion_r4566859143
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)