-
Notifications
You must be signed in to change notification settings - Fork 15.4k
MINOR: Raft max batch size needs to propagate to log config #10256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,9 +22,9 @@ import java.util | |
| import java.util.OptionalInt | ||
| import java.util.concurrent.CompletableFuture | ||
|
|
||
| import kafka.log.{Log, LogConfig, LogManager} | ||
| import kafka.log.Log | ||
| import kafka.raft.KafkaRaftManager.RaftIoThread | ||
| import kafka.server.{BrokerTopicStats, KafkaConfig, LogDirFailureChannel, MetaProperties} | ||
| import kafka.server.{KafkaConfig, MetaProperties} | ||
| import kafka.utils.timer.SystemTimer | ||
| import kafka.utils.{KafkaScheduler, Logging, ShutdownableThread} | ||
| import org.apache.kafka.clients.{ApiVersions, ClientDnsLookup, ManualMetadataUpdater, NetworkClient} | ||
|
|
@@ -220,25 +220,14 @@ class KafkaRaftManager[T]( | |
| } | ||
|
|
||
| private def buildMetadataLog(): KafkaMetadataLog = { | ||
| val defaultProps = LogConfig.extractLogConfigMap(config) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see we are no longer calling this, but rather explicitly populating the log properties. Are there other log configs we might want to expose?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seemed best for now to not allow overrides since this is a new usage of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I filed this JIRA: https://issues.apache.org/jira/browse/KAFKA-12423. |
||
| LogConfig.validateValues(defaultProps) | ||
| val defaultLogConfig = LogConfig(defaultProps) | ||
|
|
||
| val log = Log( | ||
| dir = dataDir, | ||
| config = defaultLogConfig, | ||
| logStartOffset = 0L, | ||
| recoveryPoint = 0L, | ||
| scheduler = scheduler, | ||
| brokerTopicStats = new BrokerTopicStats, | ||
| time = time, | ||
| maxProducerIdExpirationMs = config.transactionalIdExpirationMs, | ||
| producerIdExpirationCheckIntervalMs = LogManager.ProducerIdExpirationCheckIntervalMs, | ||
| logDirFailureChannel = new LogDirFailureChannel(5), | ||
| keepPartitionMetadataFile = config.usesTopicId | ||
| KafkaMetadataLog( | ||
| topicPartition, | ||
| dataDir, | ||
| time, | ||
| scheduler, | ||
| maxBatchSizeInBytes = KafkaRaftClient.MAX_BATCH_SIZE_BYTES, | ||
| maxFetchSizeInBytes = KafkaRaftClient.MAX_FETCH_SIZE_BYTES | ||
| ) | ||
|
|
||
| KafkaMetadataLog(log, topicPartition) | ||
| } | ||
|
|
||
| private def buildNetworkClient(): NetworkClient = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Makes sense to move this here since KafkaMetadataLog fully owns the Log's lifecycle