alanlau28 commented on code in PR #23037:
URL: https://github.com/apache/kafka/pull/23037#discussion_r3758298165
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/PlainToHeadersWindowStoreAdapter.java:
##########
@@ -68,6 +68,23 @@ public PlainToHeadersWindowStoreAdapter(final
WindowStore<Bytes, byte[]> store)
this.store = store;
}
+ /**
+ * Report the retention of the store being adapted. This adapter holds its
delegate in a private
+ * field rather than as a {@link WrappedStateStore}, so {@code
extractRetentionPeriod}'s unwrap
+ * walk terminates here; without this it resolves -1 and the KAFKA-13499
windowed-restore
+ * optimisation is silently skipped for every store behind the adapter.
+ */
+ @Override
+ public long retentionPeriod() {
+ StateStore current = store;
Review Comment:
Thanks @bbejeck, this makes sense. I created a static method for the
interface.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]