dajac commented on code in PR #23923:
URL: https://github.com/apache/kafka/pull/23923#discussion_r4352497676


##########
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:
   Have you considered the other way around? We could keep the new tasks as 
pending until the write succeeds. The benefit is that it would only use the 
executor when it is really decided.



-- 
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