Status
Current state: Discarded (we don't need a KIP for this change)
Discussion thread: here
JIRA: here
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
KIP-358 introduced typed representation for Window Store Interactive Query API (ReadOnlyWindowStore) to improve usability.
On the other hand, Processor API read-write Store APIs are tuned for automation, therefore they should keep the long-based methods to represent time ranges to avoid object allocation.
Deprecation notes for long-based read operations in ReadOnlyWindowStore were added in 2.1.0.
Based on these, this proposal includes:
- Remove deprecated methods from ReadOnlyWindowStore
- Remove deprecation annotation on long-based read operations in WindowStore
All these changes are targeting the next major release. Currently v3.0.
Similar changes for SessionStore are considered in KIP-666, but can be introduced earlier as they do not include removing deprecated methods.
Public Interfaces
- org.apache.kafka.streams.state.ReadOnlyWindowStore
- Remove method:
WindowStoreIterator<V> fetch(K key, long timeFrom, long timeTo) - Remove method:
KeyValueIterator<Windowed<K>, V> fetch(K from, K to, long timeFrom, long timeTo) - Remove method:
KeyValueIterator<Windowed<K>, V> fetchAll(long timeFrom, long timeTo)
- Remove method:
- org.apache.kafka.streams.state.WindowStore
- Remove @Deprecated annotation: WindowStoreIterator<V> fetch(K key, long timeFrom, long timeTo)
- Remove @Deprecated annotation: KeyValueIterator<Windowed<K>, V> fetch(K from, K to, long timeFrom, long timeTo)
- Remove @Deprecated annotation: KeyValueIterator<Windowed<K>, V> fetchAll(long timeFrom, long timeTo)
Compatibility, Deprecation, and Migration Plan
- Users implementing custom stores or interactive query API for WindowStore will have to remove long-based methods and migrate to Instant-based ones. This is why this KIP is targeting v3.0
Rejected Alternatives
None.