chia7712 commented on code in PR #22060:
URL: https://github.com/apache/kafka/pull/22060#discussion_r3304859087


##########
clients/src/main/java/org/apache/kafka/common/telemetry/ClientTelemetryState.java:
##########
@@ -119,12 +118,12 @@ metrics after the elapsed wait interval. But, if the push 
fails (network issues,
         /*

Review Comment:
   It seems we can do more about it. For example
   ```java
   private static final Map<ClientTelemetryState, List<ClientTelemetryState>> 
VALID_NEXT_STATES = Map.of(
       SUBSCRIPTION_NEEDED, List.of(SUBSCRIPTION_IN_PROGRESS, TERMINATED),
       SUBSCRIPTION_IN_PROGRESS, List.of(PUSH_NEEDED, SUBSCRIPTION_NEEDED, 
TERMINATING_PUSH_NEEDED, TERMINATED),
       PUSH_NEEDED, List.of(PUSH_IN_PROGRESS, SUBSCRIPTION_NEEDED, 
TERMINATING_PUSH_NEEDED, TERMINATED),
       PUSH_IN_PROGRESS, List.of(PUSH_NEEDED, SUBSCRIPTION_NEEDED, 
TERMINATING_PUSH_NEEDED, TERMINATED),
       TERMINATING_PUSH_NEEDED, List.of(TERMINATING_PUSH_IN_PROGRESS, 
TERMINATED),
       TERMINATING_PUSH_IN_PROGRESS, List.of(TERMINATED),
       TERMINATED, List.of()
   );
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to