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

Avoid handling StopReplicaRequest if no replicas to stop #473

Merged

Conversation

CCisGG
Copy link

@CCisGG CCisGG commented Aug 15, 2023

LI_DESCRIPTION = LIKAFKA-54083
EXIT_CRITERIA = N/A

Description
This is a bug found when investigating LIKAFKA-54083. Basically a StopReplicaRequest is built from LiCombinedControlRequest no matter whether there are actually replicas to stop or not. That's why we see a log line here upon handling each single LiCombinedControlRequest:

2023/08/01 13:17:47.789 [logger] [Broker id=83691] Handling StopReplica request correlationId 25251 from controller 78691 for 0 partitions

We should avoid building and handling such request when there are no replicas to stop. It will not only clean up the logs, but also slightly improve the performance of handling LiCombinedControlRequest.

Copy link

@groelofs groelofs left a comment

Choose a reason for hiding this comment

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

Nice mini-optimization! Thanks.

@CCisGG CCisGG merged commit 73cdd9b into 3.0-li Aug 15, 2023
25 checks passed
@CCisGG CCisGG deleted the 20230815_remove_stop_replica_requests_if_no_partitions branch August 15, 2023 22:45
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.

2 participants