Skip to content

MINOR: Raft max batch size needs to propagate to log config#10256

Merged
hachikuji merged 3 commits into
apache:trunkfrom
hachikuji:fix-raft-max-batch-size
Mar 4, 2021
Merged

MINOR: Raft max batch size needs to propagate to log config#10256
hachikuji merged 3 commits into
apache:trunkfrom
hachikuji:fix-raft-max-batch-size

Conversation

@hachikuji

Copy link
Copy Markdown
Contributor

We increased the max batch size to 8MB in #10063, but we forgot to propagate the change to the Log instance which does its own validation. I had actually noted it in this comment #10063 (review), but I forgot about it afterwards.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@ijuma

ijuma commented Mar 4, 2021

Copy link
Copy Markdown
Member

Do we need a test?

@hachikuji

Copy link
Copy Markdown
Contributor Author

@ijuma Yes, probably. I'm working on it.

@mumrah mumrah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hachikuji! A few questions inline

Comment thread core/src/main/scala/kafka/raft/KafkaMetadataLog.scala Outdated
LogConfig.validateValues(props)
val defaultLogConfig = LogConfig(props)

val log = Log(

Copy link
Copy Markdown
Member

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

Comment thread core/src/test/scala/kafka/raft/KafkaMetadataLogTest.scala
}

private def buildMetadataLog(): KafkaMetadataLog = {
val defaultProps = LogConfig.extractLogConfigMap(config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 Log and we haven't had time to understand the impact of all of the configurations for this usage. Most of them are probably safe, but others do not even make sense (e.g. the retention settings). Let me open a JIRA so that we can consider which configs we want to expose for the metadata log and how we want to expose them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mumrah mumrah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hachikuji
hachikuji merged commit 0685b9d into apache:trunk Mar 4, 2021
hachikuji added a commit that referenced this pull request Mar 4, 2021
This patch ensures that the constant max batch size defined in `KafkaRaftClient` is propagated to the constructed log configuration in `KafkaMetadataLog`. We also ensure that the fetch max size is set consistently with appropriate testing. 

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Arthur <mumrah@gmail.com>
@ijuma ijuma added the kraft label Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants