Skip to content

KAFKA-20875: Preserve wrapped-store chains in window adapters - #23027

Closed
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-20875-wrapped-state-store
Closed

KAFKA-20875: Preserve wrapped-store chains in window adapters#23027
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-20875-wrapped-state-store

Conversation

@lh0156

@lh0156 lh0156 commented Aug 2, 2026

Copy link
Copy Markdown

Problem

The plain and timestamped window-store adapters used for header-aware compatibility directly implemented WindowStore and kept their delegates in private fields. As a result, the adapters terminated the standard WrappedStateStore chain: wrapped(), findInner(), and recursive store-type inspection could not see the underlying store.

Solution

  • Make both window-store adapters extend WrappedStateStore.
  • Route existing delegation through the inherited wrapped() contract without changing value-format conversions.
  • Update time-ordered-store detection to use wrapped() instead of adapter-specific delegate state.
  • Add regression tests for direct wrapping, inner-store discovery, and timestamped-store detection.

Testing

  • RED: the new chain tests failed against the baseline at test compilation because neither adapter exposed wrapped() or findInner().
  • GREEN: both adapter test classes pass, including all existing query and execution-info tests.
  • ./gradlew :streams:test --tests org.apache.kafka.streams.state.internals.PlainToHeadersWindowStoreAdapterTest --tests org.apache.kafka.streams.state.internals.TimestampedToHeadersWindowStoreAdapterTest --no-build-cache --console=plain
  • ./gradlew :streams:test --tests org.apache.kafka.streams.state.internals.TimestampedWindowStoreWithHeadersBuilderTest --tests org.apache.kafka.streams.state.internals.TimeOrderedCachingPersistentWindowStoreTest --no-build-cache --console=plain
  • :streams:check completed 9,298 tests with one timeout in CustomStickyTaskAssignorTest.largeAssignmentShouldTerminateWithinAcceptableTime under the balance_subtopology strategy; the parameterized test passed for all three strategies when rerun in isolation. Checkstyle, Spotless, SpotBugs, Javadoc, and the public API checker passed.

Fixes KAFKA-20875

Reviewers: Sean Quah squah@confluent.io

Make the plain and timestamped window-store header adapters extend WrappedStateStore so store-chain inspection and inner-store discovery continue through the adapters. Keep the existing format conversions and update the time-ordered-store special cases to use the standard wrapped() contract.

Generated-by: OpenAI Codex (GPT-5)
@github-actions github-actions Bot added triage PRs from the community streams labels Aug 2, 2026
@squah-confluent

squah-confluent commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for the patch. Please note that PR #23037 has been opened by the reporter and assignee of the JIRA issue. Please check that JIRA issues are not already assigned and have no existing PRs before throwing AI tooling at them.

@lh0156

lh0156 commented Aug 2, 2026

Copy link
Copy Markdown
Author

Closing this duplicate contribution because PR #23037 was opened by the KAFKA-20875 reporter/assignee. No branch deletion.

@lh0156 lh0156 closed this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants