squah-confluent commented on code in PR #23923:
URL: https://github.com/apache/kafka/pull/23923#discussion_r4359324839
##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorExecutorImpl.java:
##########
@@ -176,6 +178,12 @@ synchronized boolean isReleased() {
private final CoordinatorShardScheduler<U> scheduler;
private final Map<String, Task<?>> tasks = new ConcurrentHashMap<>();
+ /**
+ * The keys of the tasks scheduled since the last snapshot taken by {@link
#createSnapshot()}.
+ * These tasks are cancelled when reverting to the snapshot with {@link
#revertToSnapshot()}.
+ */
+ private final Set<String> tasksToCancelOnRevert = new HashSet<>();
Review Comment:
That would be good for saving resources in the (less common) cases where
reverts happen. We don't have any strong latency requirements for the tasks so
it sounds okay. I tried it in the latest update to the PR. It's a little more
complicated to test now that it's part of the task lifecycle.
--
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]