mitsa-ng commented on code in PR #24346:
URL: https://github.com/apache/kafka/pull/24346#discussion_r4714722028
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -369,21 +369,30 @@ private void handleFatalThrowable(final Throwable
throwable) {
private void handleTaskCorruptedException(final TaskCorruptedException
taskCorruptedException) {
log.info("Encountered task corrupted exception: ",
taskCorruptedException);
final Set<TaskId> corruptedTaskIds =
taskCorruptedException.corruptedTasks();
- final Set<Task> corruptedTasks = new HashSet<>();
+ final Set<Task> corruptedUpdatingTasks = new HashSet<>();
+ final Set<Task> corruptedPausedTasks = new HashSet<>();
final Set<TopicPartition> changelogsOfCorruptedTasks = new
HashSet<>();
for (final TaskId taskId : corruptedTaskIds) {
- final Task corruptedTask = updatingTasks.get(taskId);
- if (corruptedTask == null) {
- throw new IllegalStateException("Task " + taskId + " is
corrupted but is not updating. " + BUG_ERROR_MESSAGE);
+ final Task corruptedTask;
+ if (updatingTasks.containsKey(taskId)) {
+ corruptedTask = updatingTasks.get(taskId);
+ corruptedUpdatingTasks.add(corruptedTask);
+ } else if (pausedTasks.containsKey(taskId)) {
Review Comment:
Applied in af62862e.
--
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]