AndrewJSchofield commented on code in PR #17908: URL: https://github.com/apache/kafka/pull/17908#discussion_r1858989261
########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -97,17 +97,17 @@ public class ProducerConfig extends AbstractConfig { + "batch size is under this <code>batch.size</code> setting."; /** <code>partitioner.adaptive.partitioning.enable</code> */ - public static final String PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_CONFIG = "partitioner.adaptive.partitioning.enable"; - private static final String PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_DOC = - "When set to 'true', the producer will try to adapt to broker performance and produce more messages to partitions hosted on faster brokers. " + public static final String PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_CONFIG = "partitioner.adaptive.partitioning.enable"; + private static final String PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_DOC = + "When set to 'true', the producer will try to adapt to broker performance and produce more messages to partitions hosted on faster brokers." + "If 'false', producer will try to distribute messages uniformly. Note: this setting has no effect if a custom partitioner is used"; /** <code>partitioner.availability.timeout.ms</code> */ public static final String PARTITIONER_AVAILABILITY_TIMEOUT_MS_CONFIG = "partitioner.availability.timeout.ms"; private static final String PARTITIONER_AVAILABILITY_TIMEOUT_MS_DOC = "If a broker cannot process produce requests from a partition for <code>" + PARTITIONER_AVAILABILITY_TIMEOUT_MS_CONFIG + "</code> time, " + "the partitioner treats that partition as not available. If the value is 0, this logic is disabled. " - + "Note: this setting has no effect if a custom partitioner is used or <code>" + PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_CONFIG + + "Note: this setting has no effect if a custom partitioner is used or <code>" + PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_CONFIG + "</code> is set to 'false'"; Review Comment: nit: Please end the doc string with ".". ########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -380,7 +380,7 @@ public class ProducerConfig extends AbstractConfig { .define(COMPRESSION_LZ4_LEVEL_CONFIG, Type.INT, CompressionType.LZ4.defaultLevel(), CompressionType.LZ4.levelValidator(), Importance.MEDIUM, COMPRESSION_LZ4_LEVEL_DOC) .define(COMPRESSION_ZSTD_LEVEL_CONFIG, Type.INT, CompressionType.ZSTD.defaultLevel(), CompressionType.ZSTD.levelValidator(), Importance.MEDIUM, COMPRESSION_ZSTD_LEVEL_DOC) .define(BATCH_SIZE_CONFIG, Type.INT, 16384, atLeast(0), Importance.MEDIUM, BATCH_SIZE_DOC) - .define(PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_CONFIG, Type.BOOLEAN, true, Importance.LOW, PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_DOC) + .define(PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_CONFIG, Type.BOOLEAN, true, Importance.LOW, PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_DOC) Review Comment: If I'm reading this correctly, you need to change both occurrences of ADPATIVE to ADAPTIVE and you've only done the first. ########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -97,17 +97,17 @@ public class ProducerConfig extends AbstractConfig { + "batch size is under this <code>batch.size</code> setting."; /** <code>partitioner.adaptive.partitioning.enable</code> */ - public static final String PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_CONFIG = "partitioner.adaptive.partitioning.enable"; - private static final String PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_DOC = - "When set to 'true', the producer will try to adapt to broker performance and produce more messages to partitions hosted on faster brokers. " + public static final String PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_CONFIG = "partitioner.adaptive.partitioning.enable"; + private static final String PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_DOC = + "When set to 'true', the producer will try to adapt to broker performance and produce more messages to partitions hosted on faster brokers." + "If 'false', producer will try to distribute messages uniformly. Note: this setting has no effect if a custom partitioner is used"; Review Comment: nit: Please end the doc string with ".". ########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -97,17 +97,17 @@ public class ProducerConfig extends AbstractConfig { + "batch size is under this <code>batch.size</code> setting."; /** <code>partitioner.adaptive.partitioning.enable</code> */ - public static final String PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_CONFIG = "partitioner.adaptive.partitioning.enable"; - private static final String PARTITIONER_ADPATIVE_PARTITIONING_ENABLE_DOC = - "When set to 'true', the producer will try to adapt to broker performance and produce more messages to partitions hosted on faster brokers. " + public static final String PARTITIONER_ADAPTIVE_PARTITIONING_ENABLE_CONFIG = "partitioner.adaptive.partitioning.enable"; Review Comment: Strictly speaking, this typo has formed part of the public interface since it was introduced in 2022. So, really, you should leave the existing constants in place and mark them as deprecated. They can then be removed in AK 5.0. Otherwise, any applications which happened to use the wrong spelling would fail to build. -- 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