You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/03/29 00:36:54 UTC

[GitHub] [kafka] lihaosky commented on a change in pull request #11896: [Emit final][5/N] emit final for TimeWindowedKStreamImpl

lihaosky commented on a change in pull request #11896:
URL: https://github.com/apache/kafka/pull/11896#discussion_r836956890



##########
File path: streams/src/main/java/org/apache/kafka/streams/kstream/internals/TimeWindowedKStreamImpl.java
##########
@@ -224,7 +225,15 @@
                         + " retention=[" + retentionPeriod + "]");
             }
 
-            supplier = Stores.persistentTimestampedWindowStore(
+            // TODO: use different store name for emit final case?
+            supplier = emitFinal ?
+                Stores.persistentTimeOrderedWindowStore(
+                materialized.storeName(),
+                Duration.ofMillis(retentionPeriod),
+                Duration.ofMillis(windows.size()),
+                false, false)

Review comment:
       Seems `windowStore` in window aggregate is only used by `windowStore.fetch(key, window.start());`, so I don't need to use index as fetching from time ordered schema is also a point get.

##########
File path: streams/src/main/java/org/apache/kafka/streams/state/Stores.java
##########
@@ -160,6 +161,35 @@ public String metricsScope() {
         };
     }
 
+    /**

Review comment:
       Yes. It was previously on topic another change




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org