[
https://issues.apache.org/jira/browse/FLINK-16638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093363#comment-17093363
]
Eduardo Winpenny Tejedor commented on FLINK-16638:
--------------------------------------------------
Hi [~roman_khachatryan], sure, the idea is to avoid future similar bugs by
forcing developers to access a single list of (operatorId,
userDefinedOperatorId) pairs. Using only one set of ids or both is then a
conscious choice of the developer. This can be achieved with a new class
OperatorIdPair that will hold both ids.
I've pushed the putative changes to
[https://github.com/edu05/flink/tree/FLINK-16638-PREP] , the fix is also
included, developers are forced to make a conscious decision as which operator
ids to use and presents the chance to remove some code (look at //COULD THIS IF
BLOCK BE REMOVED IF THE ALTERNATIVE IDS HAD BEEN ADDED TO THE MAPPING FROM THE
START? comment).
My question in my previous post was around how come there are 3 out of 6
invocations that DO need the user defined operator id, whereas the other 3 do
NOT.
I hope this helps illustrate, let me know your thoughts!
> Flink checkStateMappingCompleteness doesn't include UserDefinedOperatorIDs
> --------------------------------------------------------------------------
>
> Key: FLINK-16638
> URL: https://issues.apache.org/jira/browse/FLINK-16638
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Checkpointing
> Affects Versions: 1.9.1, 1.10.0
> Reporter: Bashar Abdul Jawad
> Priority: Critical
> Fix For: 1.11.0
>
>
> [StateAssignmentOperation.checkStateMappingCompleteness|https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L555]
> doesn't check for UserDefinedOperatorIDs (specified using setUidHash),
> causing the exception:
> {code}
> java.lang.IllegalStateException: There is no operator for the state {}
> {code}
> to be thrown when a savepoint can't be mapped to an ExecutionJobVertex, even
> when the operator hash is explicitly specified.
> I believe this logic should be extended to also include
> UserDefinedOperatorIDs as so:
> {code:java}
> for (ExecutionJobVertex executionJobVertex : tasks) {
> allOperatorIDs.addAll(executionJobVertex.getOperatorIDs());
> allOperatorIDs.addAll(executionJobVertex.getUserDefinedOperatorIDs());
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)