You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "A. Sophie Blee-Goldman (Jira)" <ji...@apache.org> on 2021/08/28 01:29:00 UTC

[jira] [Commented] (KAFKA-12486) Utilize HighAvailabilityTaskAssignor to avoid downtime on corrupted task

    [ https://issues.apache.org/jira/browse/KAFKA-12486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406084#comment-17406084 ] 

A. Sophie Blee-Goldman commented on KAFKA-12486:
------------------------------------------------

{quote}Also, for my understanding, the rationale is that while this task is being revived, some other task would be assigned this task if it is caught up enough using the first probing rebalance and then when the original task is revived, it should be assigned this task based upon a subsequent rebalance, right?
{quote}
Yep, that's the idea. As I started getting into above, there are a whole host of scenarios and corresponding optimizations we could pursue if we're concerned about the overhead of unnecessary rebalances, since in some cases it certainly could be unnecessary: for example when the corrupted task didn't have that much state to begin with, or there aren't any other clients already caught up on this task who could temporarily take it over. But we should start with the basics and go from there, we can split this up into followup tickets for any future optimizations we may have in mind. The approach you suggested sounds like the right direction for now

> Utilize HighAvailabilityTaskAssignor to avoid downtime on corrupted task
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-12486
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12486
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: A. Sophie Blee-Goldman
>            Assignee: Sagar Rao
>            Priority: Critical
>
> In KIP-441, we added the HighAvailabilityTaskAssignor to address certain common scenarios which tend to lead to heavy downtime for tasks, such as scaling out. The new assignor will always place an active task on a client which has a "caught-up" copy of that tasks' state, if any exists, while the intended recipient will instead get a standby task to warm up the state in the background. This way we keep tasks live as much as possible, and avoid the long downtime imposed by state restoration on active tasks.
> We can actually expand on this to reduce downtime due to restoring state: specifically, we may throw a TaskCorruptedException on an active task which leads to wiping out the state stores of that task and restoring from scratch. There are a few cases where this may be thrown:
>  # No checkpoint found with EOS
>  # TimeoutException when processing a StreamTask
>  # TimeoutException when committing offsets under eos
>  # RetriableException in RecordCollectorImpl
> (There is also the case of OffsetOutOfRangeException, but that is excluded here since it only applies to standby tasks).
> We should consider triggering a rebalance when we hit TaskCorruptedException on an active task, after we've wiped out the corrupted state stores. This will allow the assignor to temporarily redirect this task to another client who can resume work on the task while the original owner works on restoring the state from scratch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)