freeznet opened a new pull request #10502: URL: https://github.com/apache/pulsar/pull/10502
Fixes #10235 ### Motivation According to #10235, when `LeaderService` is changing leadership status (like losing leadership, or becoming a leader), the `LeaderService` will be locked with `synchronized` block. Which will block other threads if calling `LeaderService.isLeader()`. This PR changes `ClusterServiceCoordinator` and `WorkerStatsManager` to check if is leader from `MembershipManager`, which will not block other threads if `LeaderService` is at `synchronized` block. Also, this PR will not resolve the root cause of #10235, since there is lack of context about blocked reader for the `FunctionAssignmentTailer`. ### Verifying this change - [ ] Make sure that the change passes the CI checks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
