KAFKA-20277: Add session store with headers support for IQv2#21670
Open
bbejeck wants to merge 5 commits intoapache:trunkfrom
Open
KAFKA-20277: Add session store with headers support for IQv2#21670bbejeck wants to merge 5 commits intoapache:trunkfrom
bbejeck wants to merge 5 commits intoapache:trunkfrom
Conversation
f154e45 to
6c7e81b
Compare
6c7e81b to
819d3d8
Compare
mjsax
approved these changes
Mar 11, 2026
Member
mjsax
left a comment
There was a problem hiding this comment.
Overall LGTM. Just some nits/question. Feel free to merge.
| public boolean isSession() { | ||
| return false; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Can we revert this to get rid of the whole file in the PR?
| public KeyValueIterator<Windowed<K>, AggregationWithHeaders<AGG>> findSessions(final K key, | ||
| final Instant earliestSessionEndTime, | ||
| final Instant latestSessionStartTime) { | ||
| return super.findSessions(key, earliestSessionEndTime, latestSessionStartTime); |
Member
There was a problem hiding this comment.
Why are we overriding this method if we only call super anyway?
| if (query instanceof WindowRangeQuery) { | ||
| final WindowRangeQuery<?, ?> windowRangeQuery = (WindowRangeQuery<?, ?>) query; | ||
| if (windowRangeQuery.getKey().isPresent()) { | ||
| result = runRangeQueryWithHeadersUnwrap(query, positionBound, config); |
Member
There was a problem hiding this comment.
Suggested change
| result = runRangeQueryWithHeadersUnwrap(query, positionBound, config); | |
| result = runRangeQuery(query, positionBound, config); |
Member
There was a problem hiding this comment.
Let's keep the name simple -- it's a private method only, so it seems unnecessary to have a too complex name.
| final QueryResult<R> result; | ||
|
|
||
| if (query instanceof WindowRangeQuery) { | ||
| final WindowRangeQuery<?, ?> windowRangeQuery = (WindowRangeQuery<?, ?>) query; |
Member
There was a problem hiding this comment.
Why are we using <?, ?> instead of <K, V> like we do in MeteredSessionStore.
| private <R> QueryResult<R> runRangeQueryWithHeadersUnwrap(final Query<R> query, | ||
| final PositionBound positionBound, | ||
| final QueryConfig config) { | ||
| final WindowRangeQuery<K, ?> typedQuery = (WindowRangeQuery<K, ?>) query; |
| final QueryResult<KeyValueIterator<Windowed<Bytes>, byte[]>> rawResult = | ||
| wrapped().query(rawKeyQuery, positionBound, config); | ||
| if (rawResult.isSuccess()) { | ||
| final MeteredWindowedKeyValueIterator<K, ?> typedResult = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is NOT about implementing IQv2s for header-store, but provides
IQv2s for headers store through the session state stores. So the results
do not contain the headers even though the headers are preserved in the
headers state store.
Part of KIP-1271.