You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mjsax (via GitHub)" <gi...@apache.org> on 2023/03/07 01:30:31 UTC

[GitHub] [kafka] mjsax commented on a diff in pull request #13292: KAFKA-14491: [14/N] Set changelog topic configs for versioned stores

mjsax commented on code in PR #13292:
URL: https://github.com/apache/kafka/pull/13292#discussion_r1127245620


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java:
##########
@@ -1293,12 +1306,16 @@ private void setRegexMatchedTopicToStateStore() {
 
     private <S extends StateStore> InternalTopicConfig createChangelogTopicConfig(final StateStoreFactory<S> factory,
                                                                                   final String name) {
-        if (factory.isWindowStore()) {
+        if (factory.isVersionedStore()) {
+            final VersionedChangelogTopicConfig config = new VersionedChangelogTopicConfig(name, factory.logConfig());
+            config.setMinCompactionLagMs(factory.historyRetention());

Review Comment:
   Do we also need to increase `delete.retention.ms` for this case? Not sure how both config "interact".



##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java:
##########
@@ -1293,12 +1306,16 @@ private void setRegexMatchedTopicToStateStore() {
 
     private <S extends StateStore> InternalTopicConfig createChangelogTopicConfig(final StateStoreFactory<S> factory,
                                                                                   final String name) {
-        if (factory.isWindowStore()) {
+        if (factory.isVersionedStore()) {
+            final VersionedChangelogTopicConfig config = new VersionedChangelogTopicConfig(name, factory.logConfig());
+            config.setMinCompactionLagMs(factory.historyRetention());

Review Comment:
   Why are we setting this "outside" but not via the constructor? (I see that we do the same thing for `WindowedChangelogTopicConfig` but I am not sure why either.)



-- 
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