jolshan commented on code in PR #13961: URL: https://github.com/apache/kafka/pull/13961#discussion_r1254713760
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java: ########## @@ -190,6 +216,118 @@ boolean canTransitionFrom(CoordinatorState state) { abstract boolean canTransitionFrom(CoordinatorState state); } + /** + * Implements the CoordinatorTimer interface. This class keeps track of all the + * schedule timers for a coordinator/partition. + * + * When a timer is cancelled or overridden, the previous timer is guaranteed to + * not be executed even if it already expired and got push to the event processor. + * + * When a timer fails with an unexpected exception, the timer is reschedule with + * a backoff. + */ + class InternalCoordinatorTimer implements CoordinatorTimer<U> { + /** + * The logger. + */ + final Logger log; + + /** + * The topic partition. + */ + final TopicPartition tp; + + /** + * The scheduled timers keyed by their key. + */ + final Map<String, TimerTask> tasks = new HashMap<>(); Review Comment: I guess I also realize I don't fully understand why we need to have a timer for these events. But maybe I need to re-read the KIP. -- 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