KAFKA-20497: Add TimeOrderedCachingWindowStore#readOnly#22315
KAFKA-20497: Add TimeOrderedCachingWindowStore#readOnly#22315nicktelford wants to merge 3 commits into
Conversation
|
A label of 'needs-attention' was automatically added to this PR in order to raise the |
3ba32a2 to
81dc06a
Compare
There was a problem hiding this comment.
Thanks @nicktelford - overall looks good but there are a couple of failing tests
org.apache.kafka.streams.state.internals.TimeOrderedCachingPersistentWindowStoreTest#shouldThrowOnNullInstantInViewFetchorg.apache.kafka.streams.state.internals.TimeOrderedCachingPersistentWindowStoreTest#shouldNotThrowInvalidBackwardRangeExceptionWithNegativeFromKey
81dc06a to
a365582
Compare
@bbejeck Rebased on trunk; these test failures should now be resolved. |
|
@nicktelford - needs |
|
Thanks @nicktelford - looks good overall but there are some test failures which I think can be resolved by updating the log statement on line 526 is in |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The warning logged when a key range fetch has `from > to` only mentioned serde ordering issues as a possible cause, omitting the more obvious case where the caller simply passes the range arguments in the wrong order. Adding that phrase gives users a clearer first-line diagnostic before they investigate their serde implementations. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
ce95136 to
3710346
Compare
|
@bbejeck I think I fixed this the other day but forgot to push the new commit 🤦♂️ |
|
Thanks @nicktelford - still getting the same test failures. |
The cache holds uncommitted writes that must not be visible under
READ_COMMITTED, so that isolation level bypasses the cache entirely and
delegates straight to the inner store's readOnly view. READ_UNCOMMITTED
requires a merged view through a ReadOnlyView. The ReadOnlyView
delegates to the existing fetchInternal/fetchKeyRange/fetchAllInternal
helpers and converts Instant arguments to epoch-milliseconds before
calling them; the cache key schema operates in longs throughout, so
converting early avoids repeated Instant-to-long conversions in iterator
hot paths.
KAFKA-20497
Reviewers: Bill Bejeck bbejeck@apache.org