Skip to content

ZOOKEEPER-4898: FastLeaderElection WorkerSender/WorkerReceiver don't need to be Thread#2228

Merged
tisonkun merged 2 commits intoapache:masterfrom
ZLATAN628:ZOOKEEPER-4898
Feb 28, 2025
Merged

ZOOKEEPER-4898: FastLeaderElection WorkerSender/WorkerReceiver don't need to be Thread#2228
tisonkun merged 2 commits intoapache:masterfrom
ZLATAN628:ZOOKEEPER-4898

Conversation

@ZLATAN628
Copy link
Contributor

WorkerSender inherits from ZooKeeperThread. When using WorkerSender, a WorkerSender thread is created first, followed by the creation of a new thread where WorkerSender is passed as a task. At this point, the ExceptionHandler in ZooKeeperThread does not take effect.

…d leads to the failure of exception handling
Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

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

I am not sure why ZOOKEEPER-1810 introduced separated thread. But there are do differences in behavior in logging(jdk System.err vs slf4j LOG.info).

I am good to the direction. Also, it will supersede ZOOKEEPER-4884.

…d leads to the failure of exception handling
Copy link
Member

@tisonkun tisonkun 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 your contribution! LGTM.

@tisonkun tisonkun changed the title ZOOKEEPER-4898: The incorrect usage of the subclass of ZooKeeperThrea… ZOOKEEPER-4898: FastLeaderElection WorkerSender/WorkerReceiver don't need to be Thread Feb 28, 2025
@tisonkun tisonkun merged commit 1a9bcbd into apache:master Feb 28, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants