-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
KAFKA-18209 Cleanup __transaction_state
config logic
#18201
base: trunk
Are you sure you want to change the base?
Conversation
A label of 'needs-attention' was automatically added to this PR in order to raise the |
@mimaison Can you tell me if there's anything I can do to improve my PR? |
A label of 'needs-attention' was automatically added to this PR in order to raise the |
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.
Thanks for the PR. I left a suggestion.
// 2. compression = none | ||
// 3. unclean leader election = disabled | ||
// 4. required acks = -1 when writing | ||
val EnforcedCompression: Compression = Compression.NONE |
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.
We also want to use these fields in transactionTopicConfigs()
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.
I corrected it.
Is that what you wanted?
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.
I'm not sure this is the best place to store these values. Have you considered TransactionCoordinator
? I'm not saying it should go there, just asking.
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.
Since TransactionStateManager#transactionTopicConfigs
is used only in TransactionCoordinator
, it makes sense to store these values in TransactionCoordinator
.
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.
When I opened the ticket I was hoping we could do a bit more cleanup, but maybe there isn't much to do. The point of the Jira was to investigate and see what could be done.
I left a couple of comments on the changes you propose.
core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
Outdated
Show resolved
Hide resolved
// 2. compression = none | ||
// 3. unclean leader election = disabled | ||
// 4. required acks = -1 when writing | ||
val EnforcedCompression: Compression = Compression.NONE |
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.
I'm not sure this is the best place to store these values. Have you considered TransactionCoordinator
? I'm not saying it should go there, just asking.
Since the
EnforcedCompression
andEnforcedRequiredAcks
fields are used only in the TransactionStateManager class, I moved them to a companion object.Committer Checklist (excluded from commit message)