Jess Jin created KAFKA-20776:
--------------------------------
Summary: MeteredKeyValueStore / MeteredTimestampedKeyValueStore
ignore skipCache() for KeyQuery and TimestampedKeyQuery
Key: KAFKA-20776
URL: https://issues.apache.org/jira/browse/KAFKA-20776
Project: Kafka
Issue Type: Improvement
Components: streams
Reporter: Jess Jin
Assignee: Jess Jin
When an IQv2 KeyQuery (or TimestampedKeyQuery) is issued with skipCache()
against a metered key-value store, the metered store rebuilds the raw
KeyQuery<Bytes, byte[]> it forwards to the wrapped (caching) store without
propagating isSkipCache(). The caching layer therefore never sees skipCache.
Affected handlers:
- MeteredKeyValueStore.runKeyQuery
- MeteredTimestampedKeyValueStore.runKeyQuery / runTimestampedKeyQuery
- MeteredTimestampedKeyValueStoreWithHeaders.runKeyQuery /
runTimestampedKeyQuery
Fix:
- Propagate isSkipCache() onto the raw KeyQuery forwarded by each of these
handlers.
- Collapse the repeated if (isSkipCache()) rawKeyQuery =
rawKeyQuery.skipCache() into a single shared helper.
- Add a shared test utility asserting skipCache propagation, and cover KeyQuery
/ TimestampedKeyQuery on the plain metered stores.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)