[
https://issues.apache.org/jira/browse/FLINK-12843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
zhijiang updated FLINK-12843:
-----------------------------
Description:
The pin logic is for adding the reference counter based on number of
subpartitions for {{ReleaseOnConsumptionResultPartition}}.
It seems not necessary to do it in while loop as now, because the atomic
counter would not be accessed by other threads during pin. If the
{{ReleaseOnConsumptionResultPartition}} was not created yet, the
{{createSubpartitionView}} would not be called actually resulting in
{{PartitionNotFoundException}}.
So we could simple increase the reference counter in
ReleaseOnConsumptionResultPartition constructor directly.
was:
The pin logic is for adding the reference counter based on number of
subpartitions in {{ResultPartition}}. It seems not necessary to do it in while
loop as now, because the atomic counter would not be accessed by other threads
during pin. If the `ResultPartition` is not created yet, the
{{ResultPartition#createSubpartitionView}} would not be called and it would
response {{ResultPartitionNotFoundException}} in {{ResultPartitionManager}}.
So we could simple increase the reference counter in {{ResultPartition}}
constructor directly.
> Refactor the pin logic in ReleaseOnConsumptionResultPartition
> -------------------------------------------------------------
>
> Key: FLINK-12843
> URL: https://issues.apache.org/jira/browse/FLINK-12843
> Project: Flink
> Issue Type: Sub-task
> Components: Runtime / Network
> Reporter: zhijiang
> Assignee: zhijiang
> Priority: Minor
>
> The pin logic is for adding the reference counter based on number of
> subpartitions for {{ReleaseOnConsumptionResultPartition}}.
> It seems not necessary to do it in while loop as now, because the atomic
> counter would not be accessed by other threads during pin. If the
> {{ReleaseOnConsumptionResultPartition}} was not created yet, the
> {{createSubpartitionView}} would not be called actually resulting in
> {{PartitionNotFoundException}}.
> So we could simple increase the reference counter in
> ReleaseOnConsumptionResultPartition constructor directly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)