[ 
https://issues.apache.org/jira/browse/FLINK-16180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhu Zhu updated FLINK-16180:
----------------------------
    Description: 
{{ScheduledUnit#vertexExecution}} is nullable but {{ProgrammedSlotProvider}} 
requires it to be non-null to work. This makes {{ProgrammedSlotProvider}} not 
able to be used by new scheduler tests since {{vertexExecution}} is never set 
in the new scheduler code path. It blocks us from reworking tests which are 
based legacy scheduling to base on the new scheduler.

I would propose to replace the nullable vertexExecution with a non-null 
executionVertexID.

This change would not break anything since {{vertexExecution}} is mainly used 
by {{ProgrammedSlotProvider}} for testing. {{ProgrammedSlotProvider}} uses it 
to retrieve the JobVertexID and subtaskIndex. 
The only other place where {{ScheduledUnit#vertexExecution}} is used is to log 
the involved task for slot allocation in 
{{SchedulerImpl#allocateSlotInternal(...)}}. The log is problematic at the 
moment with the new scheduler since the vertexExecution is null. This change 
can fix the problematic log.

This change would also fix a NPE issue reported in FLINK-16145.


  was:
{{ScheduledUnit#vertexExecution}} is nullable but {{ProgrammedSlotProvider}} 
requires it to be non-null to work. This makes {{ProgrammedSlotProvider}} not 
able to be used by new scheduler tests since {{vertexExecution}} is never set 
in the new scheduler code path. It blocks us from reworking tests which are 
based legacy scheduling to base on the new scheduler.

I would propose to replace vertexExecution with a non-null executionVertexID.

This change would not break anything since {{vertexExecution}} is mainly used 
by {{ProgrammedSlotProvider}} in tests and logging in production. And the log 
would be broken if it is null.

This would also fix a potential bug, as reported in FLINK-16145.



> Replacing vertexExecution in ScheduledUnit with executionVertexID
> -----------------------------------------------------------------
>
>                 Key: FLINK-16180
>                 URL: https://issues.apache.org/jira/browse/FLINK-16180
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>    Affects Versions: 1.11.0
>            Reporter: Zhu Zhu
>            Assignee: Zhu Zhu
>            Priority: Major
>             Fix For: 1.11.0
>
>
> {{ScheduledUnit#vertexExecution}} is nullable but {{ProgrammedSlotProvider}} 
> requires it to be non-null to work. This makes {{ProgrammedSlotProvider}} not 
> able to be used by new scheduler tests since {{vertexExecution}} is never set 
> in the new scheduler code path. It blocks us from reworking tests which are 
> based legacy scheduling to base on the new scheduler.
> I would propose to replace the nullable vertexExecution with a non-null 
> executionVertexID.
> This change would not break anything since {{vertexExecution}} is mainly used 
> by {{ProgrammedSlotProvider}} for testing. {{ProgrammedSlotProvider}} uses it 
> to retrieve the JobVertexID and subtaskIndex. 
> The only other place where {{ScheduledUnit#vertexExecution}} is used is to 
> log the involved task for slot allocation in 
> {{SchedulerImpl#allocateSlotInternal(...)}}. The log is problematic at the 
> moment with the new scheduler since the vertexExecution is null. This change 
> can fix the problematic log.
> This change would also fix a NPE issue reported in FLINK-16145.



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

Reply via email to