m1a2st commented on code in PR #19371:
URL: https://github.com/apache/kafka/pull/19371#discussion_r2102394876
##########
core/src/main/scala/kafka/raft/KafkaMetadataLog.scala:
##########
@@ -589,8 +589,9 @@ object KafkaMetadataLog extends Logging {
): KafkaMetadataLog = {
val props = new Properties()
props.setProperty(TopicConfig.MAX_MESSAGE_BYTES_CONFIG,
config.maxBatchSizeInBytes.toString)
- props.setProperty(TopicConfig.SEGMENT_BYTES_CONFIG,
config.logSegmentBytes.toString)
- props.setProperty(TopicConfig.SEGMENT_MS_CONFIG,
config.logSegmentMillis.toString)
+ // Since MetadataLogConfig validates the log segment size using a minimum
allowed value,
+ // we can safely use `internal.segment.bytes` to configure it instead of
relying on `segment.bytes`.
+ props.setProperty(LogConfig.INTERNAL_SEGMENT_BYTES_CONFIG,
config.logSegmentBytes.toString)
Review Comment:
I believe we shouldn’t move this constructor outside of `MetadataLogConfig`,
because the public `MetadataLogConfig(AbstractConfig config)` constructor
doesn’t allow us to set properties like `maxBatchSizeInBytes`,
`maxFetchSizeInBytes`, or `deleteDelayMillis`.
--
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]