-
Notifications
You must be signed in to change notification settings - Fork 15.4k
MINOR: more log4j entry on elect / resignation of coordinators #9416
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 1 commit
a7e03d5
4b789a7
10808ca
fc2b6ea
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 |
|---|---|---|
|
|
@@ -908,6 +908,7 @@ class GroupCoordinator(val brokerId: Int, | |
| * @param offsetTopicPartitionId The partition we are now leading | ||
| */ | ||
| def onElection(offsetTopicPartitionId: Int): Unit = { | ||
| info(s"Becoming the group coordinator for partition $offsetTopicPartitionId") | ||
| groupManager.scheduleLoadGroupAndOffsets(offsetTopicPartitionId, onGroupLoaded) | ||
| } | ||
|
|
||
|
|
@@ -917,6 +918,7 @@ class GroupCoordinator(val brokerId: Int, | |
| * @param offsetTopicPartitionId The partition we are no longer leading | ||
| */ | ||
| def onResignation(offsetTopicPartitionId: Int): Unit = { | ||
| info(s"Resigning the group coordinator for partition $offsetTopicPartitionId") | ||
|
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. Shouldn't this be |
||
| groupManager.removeGroupsForPartition(offsetTopicPartitionId, onGroupUnloaded) | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,6 +311,7 @@ class TransactionCoordinator(brokerId: Int, | |
| * @param coordinatorEpoch The partition coordinator (or leader) epoch from the received LeaderAndIsr request | ||
| */ | ||
| def onElection(txnTopicPartitionId: Int, coordinatorEpoch: Int): Unit = { | ||
| info(s"Becoming the txn coordinator for partition $txnTopicPartitionId at epoch $coordinatorEpoch") | ||
|
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. Do you also plan to change this to |
||
| // The operations performed during immigration must be resilient to any previous errors we saw or partial state we | ||
| // left off during the unloading phase. Ensure we remove all associated state for this partition before we continue | ||
| // loading it. | ||
|
|
@@ -329,6 +330,7 @@ class TransactionCoordinator(brokerId: Int, | |
| * are resigning after receiving a StopReplica request from the controller | ||
| */ | ||
| def onResignation(txnTopicPartitionId: Int, coordinatorEpoch: Option[Int]): Unit = { | ||
| info(s"Resigning the txn coordinator for partition $txnTopicPartitionId at epoch $coordinatorEpoch") | ||
|
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. Same as above.
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. This still needs to be changed. |
||
| coordinatorEpoch match { | ||
| case Some(epoch) => | ||
| txnManager.removeTransactionsForTxnTopicPartition(txnTopicPartitionId, epoch) | ||
|
|
||
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.
It would also be nice to have the groups that are coordinated in the log message. I guess that is hardly possible, isn't it?
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.
Yeah that cannot be known until loading is completed.
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.
But during the loading process, we do have log entry as
per group.
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.
That is correct. Thank you for reminding me!