[ https://issues.apache.org/jira/browse/KAFKA-7245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16890343#comment-16890343 ]
ASF GitHub Bot commented on KAFKA-7245: --------------------------------------- omanges commented on pull request #7105: KAFKA-7245 (Deprecate WindowStore#put(key, value)) :- The method in t… URL: https://github.com/apache/kafka/pull/7105 WindowStore#put(key, value) has no timestamp as a parameter, so it causes inconsistency to identify to which window does the key belong. The stream module of Kafka has a window state store that stores the aggregated values for a key in a given time frame. The window store is implemented as an interface, this interface has a strange method named put(key, value), this method has does not have a timestamp as a parameter which is important to determine that to which window frame does the key belongs. In this method, the current record timestamp is used for determining the window frame(as specified in the description of the method), this constraint makes WindowStore error-prone. It is also specified in the method description that method with a timestamp parameter should be used which already present in the interface which expects key, value, and start timestamp as well of the window to which the key belongs. Therefore by deprecating (and finally removing) the method put(key, value), we can prevent inconsistency. - As the method is deprecated, the test classes which used them are needed to be changed when later the method is removed. Following is the list of the classes: 1) WindowStoreFacadeTest.java 2) WindowBytesStoreTest.java 3) SimpleBenchmark.java (benchmarking) 4) RocksDBWindowStoreTest.java 5) ProcessorContextImplTest.java 6) MeteredWindowStoreTest.java 7) InMemoryWindowStoreTest.java 8) ChangeLoggingWindowBytesStoreTest.java 9) CachingWindowStoreTest.java 10) ChangeLoggingTimestampedWindowBytesStoreTest.java ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Deprecate WindowStore#put(key, value) > ------------------------------------- > > Key: KAFKA-7245 > URL: https://issues.apache.org/jira/browse/KAFKA-7245 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: Matthias J. Sax > Assignee: Omkar Mestry > Priority: Minor > Labels: kip, newbie > > We want to remove `WindowStore#put(key, value)` – for this, we first need to > deprecate is via a KIP and remove later. > Instead of using `WindowStore#put(key, value)` we need to migrate code to > specify the timestamp explicitly using `WindowStore#put(key, value, > timestamp)`. The current code base use the explicit call to set the timestamp > in production code already. The simplified `put(key, value)` is only used in > tests, and thus, we would need to update those tests. > KIP-474 :- > [https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=115526545] -- This message was sent by Atlassian JIRA (v7.6.14#76016)