Skip to content
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-14462; [13/N] CoordinatorEvent and CoordinatorEventProcessor #13666

Merged
merged 7 commits into from Jun 1, 2023

Conversation

dajac
Copy link
Contributor

@dajac dajac commented May 3, 2023

Adds CoordinatorEvent, CoordinatorEventProcessor, and MultiThreadedEventProcessor.

Committer Checklist (excluded from commit message)

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

@dajac dajac added the KIP-848 label May 3, 2023
@dajac
Copy link
Contributor Author

dajac commented May 4, 2023

@kirktrue Thanks for your comments. I have addressed them.

Copy link
Contributor

@jolshan jolshan left a 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 mostly have nits and a few questions

/**
* A {{@link CoordinatorEvent}} processor.
*/
public interface CoordinatorEventProcessor extends AutoCloseable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have any plans to make other coordinator event processors besides the multi-threaded one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I use a different implementation in unit tests (without threads) and I plan to use another one for simulation tests at some point.

Copy link
Contributor

@jeffkbkim jeffkbkim left a comment

Choose a reason for hiding this comment

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

thanks, LGTM!

*/
public synchronized void beginShutdown() {
if (shuttingDown) {
log.debug("Event processor is already shutting down.");
Copy link
Contributor

Choose a reason for hiding this comment

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

extremely minor nit that we may not even want to change -- but in theory, we could already be done "shutting down" right? Maybe not a huge complaint, but the log could be confusing if close() has already completed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. I think that the aim of this log is to catch cases where this class would be shutdown more than once by mistake so it does not have to 100% correct.

Copy link
Contributor

@jolshan jolshan left a comment

Choose a reason for hiding this comment

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

Left a small comment we don't need to necessarily change. Otherwise LGTM

@jolshan jolshan merged commit 47551ea into apache:trunk Jun 1, 2023
1 check failed
@dajac dajac deleted the KAFKA-14462-13 branch June 2, 2023 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants