OmniaGM commented on code in PR #15670:
URL: https://github.com/apache/kafka/pull/15670#discussion_r1556466418


##########
transaction-coordinator/src/main/java/org/apache/kafka/coordinator/transaction/TransactionLogConfig.java:
##########
@@ -16,11 +16,43 @@
  */
 package org.apache.kafka.coordinator.transaction;
 
+import org.apache.kafka.common.config.TopicConfig;
+import org.apache.kafka.server.config.ServerTopicConfigSynonyms;
+import org.apache.kafka.storage.internals.log.ProducerStateManagerConfig;
+
 public class TransactionLogConfig {
     // Log-level config default values
-    public static final int DEFAULT_NUM_PARTITIONS = 50;
-    public static final int DEFAULT_SEGMENT_BYTES = 100 * 1024 * 1024;
-    public static final short DEFAULT_REPLICATION_FACTOR = 3;
-    public static final int DEFAULT_MIN_IN_SYNC_REPLICAS = 2;
-    public static final int DEFAULT_LOAD_BUFFER_SIZE = 5 * 1024 * 1024;
+    public static final String TRANSACTIONS_TOPIC_PARTITIONS_CONFIG = 
"transaction.state.log.num.partitions";
+    public static final int TRANSACTIONS_TOPIC_PARTITIONS_DEFAULT = 50;
+    public static final String TRANSACTIONS_TOPIC_PARTITIONS_DOC = "The number 
of partitions for the transaction topic (should not change after deployment).";
+
+    public static final String TRANSACTIONS_TOPIC_SEGMENT_BYTES_CONFIG = 
"transaction.state.log.segment.bytes";
+    public static final int TRANSACTIONS_TOPIC_SEGMENT_BYTES_DEFAULT = 100 * 
1024 * 1024;
+    public static final String TRANSACTIONS_TOPIC_SEGMENT_BYTES_DOC = "The 
transaction topic segment bytes should be kept relatively small in order to 
facilitate faster log compaction and cache loads";
+
+    public static final String TRANSACTIONS_TOPIC_REPLICATION_FACTOR_CONFIG = 
"transaction.state.log.replication.factor";
+    public static final short TRANSACTIONS_TOPIC_REPLICATION_FACTOR_DEFAULT = 
3;
+    public static final String TRANSACTIONS_TOPIC_REPLICATION_FACTOR_DOC = 
"The replication factor for the transaction topic (set higher to ensure 
availability). " +
+            "Internal topic creation will fail until the cluster size meets 
this replication factor requirement.";
+
+    public static final String TRANSACTIONS_TOPIC_MIN_ISR_CONFIG = 
"transaction.state.log.min.isr";
+    public static final int TRANSACTIONS_TOPIC_MIN_ISR_DEFAULT = 2;
+    public static final String TRANSACTIONS_TOPIC_MIN_ISR_DOC = "Overridden " 
+ 
ServerTopicConfigSynonyms.serverSynonym(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG)
 + " config for the transaction topic.";

Review Comment:
   We maybe don't need `ServerTopicConfigSynonyms::serverSynonym` as it 
actually call 
`ServerTopicConfigSynonyms.sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG)` 
which is same as if we just referred to 
`TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG` directly. 
   
   If we want to remove the deps on `TopicConfig` we can hard code the value of 
`TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG` in doc but I personally would prefer 
that we keep the ref to the config. 



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to