apoorvmittal10 commented on code in PR #15234: URL: https://github.com/apache/kafka/pull/15234#discussion_r1460971499
########## server/src/main/java/org/apache/kafka/server/ClientMetricsManager.java: ########## @@ -253,10 +266,18 @@ private ClientMetricsInstance clientInstance(Uuid clientInstanceId, RequestConte if (clientInstance.subscriptionVersion() >= subscriptionUpdateVersion.get()) { return clientInstance; } + // Cancel the existing expiration timer task for the old client instance. + clientInstance.cancelExpirationTimerTask(); Review Comment: Yes, the call is necessary as on change of subscription the client instance is updated in cache with new instance, where old instance still has expiration task hence that needs to be cancelled. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org