Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4353#discussion_r133018189
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java
 ---
    @@ -185,44 +184,66 @@ private void assignAttemptState(ExecutionJobVertex 
executionJobVertex, List<Oper
                                        subNonPartitionableState);
     
                                // PartitionedState
    -                           
reAssignSubPartitionableState(newManagedOperatorStates,
    +                           reAssignSubPartitionableState(
    +                                   newManagedOperatorStates,
                                        newRawOperatorStates,
                                        subTaskIndex,
                                        operatorIndex,
                                        subManagedOperatorState,
                                        subRawOperatorState);
     
                                // KeyedState
    -                           if (operatorIndex == operatorIDs.size() - 1) {
    -                                   subKeyedState = 
reAssignSubKeyedStates(operatorState,
    +                           if (isHeadOperator(operatorIndex, operatorIDs)) 
{
    --- End diff --
    
    Do we need this check here? From the JobManager and CheckpointCoordinator 
side, nothing should prevent non-head operators to have keyed state. It is just 
a limitation in the current API.
    
    This check seems to "enforce" an API limitation in a more general runtime 
that does not actually have a need for that restriction.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to