[
https://issues.apache.org/jira/browse/KAFKA-20875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101084#comment-18101084
]
Yunseop Eom commented on KAFKA-20875:
-------------------------------------
PR opened: https://github.com/apache/kafka/pull/23027
Preserved the WrappedStateStore chain in the plain and timestamped window-store
adapters by extending WrappedStateStore and routing delegation through
wrapped(). Updated time-ordered-store detection and added regression tests for
wrapping, inner-store discovery, and timestamped-store detection.
Validation: RED reproduced the missing wrapped()/findInner() contract; GREEN
targeted adapter and dependent tests passed. :streams:check completed with one
unrelated parallel timeout in CustomStickyTaskAssignorTest; isolated rerun
passed for all strategies. Checkstyle, Spotless, SpotBugs, Javadoc, and public
API checks passed.
Status: PR open and awaiting review.
> Headers store adapters bypass the `WrappedStateStore` chain
> -----------------------------------------------------------
>
> Key: KAFKA-20875
> URL: https://issues.apache.org/jira/browse/KAFKA-20875
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 4.4.0, 4.3.2
> Reporter: Alan Lau
> Assignee: Alan Lau
> Priority: Blocker
>
> {{PlainToHeadersWindowStoreAdapter}} and
> {{TimestampedToHeadersWindowStoreAdapter}} wrap a store without participating
> in {{{}WrappedStateStore{}}}, making the wrapped store invisible to every
> chain.
> Both adapters hold their delegate in a private field and declare only
> {{{}implements WindowStore<Bytes, byte[]{}}}. {{{}WrappedStateStore{}}}'s
> helpers all terminate on a non-WrappedStateStore:
> {code:java}
> public static boolean isTimestamped(final StateStore stateStore) {
> if (stateStore instanceof TimestampedBytesStore) return true;
> else if (stateStore instanceof WrappedStateStore) return
> isTimestamped(wrapped());
> else return false;
> }{code}
> So {{{}isTimestamped{}}}, {{{}isVersioned{}}}, {{isHeadersAware}} and
> {{findInner}} all return {{false/null}} for anything behind these adapters,
> as do the ~8 other call sites that walk the chain
> (`ProcessorStateManager:148`, `StateManagerUtil:87`, `StoreQueryUtils:442`,
> `TimestampedWindowStoreBuilder:107`, …).
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)