ableegoldman commented on a change in pull request #8926:
URL: https://github.com/apache/kafka/pull/8926#discussion_r445262369



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java
##########
@@ -242,18 +242,16 @@ public void handleAssignment(final Map<TaskId, 
Set<TopicPartition>> activeTasks,
 
         for (final Task task : tasksToClose) {
             try {
-                task.suspend(); // Should be a no-op for active tasks since 
they're suspended in handleRevocation
-                if (task.commitNeeded()) {
-                    if (task.isActive()) {
-                        log.error("Active task {} was revoked and should have 
already been committed", task.id());
-                        throw new IllegalStateException("Revoked active task 
was not committed during handleRevocation");

Review comment:
       This was another "sort-of bug": if we hit an exception in 
`handleRevocation` we wouldn't finish committing the active tasks, so 
`commitNeeded` could still be true. But of course, if we hit an exception 
earlier, we would have thrown it up to ConsumerCoordinator which would only 
save the first exception, so this didn't really do anything




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to