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

ASF GitHub Bot commented on FLINK-7499:
---------------------------------------

GitHub user NicoK opened a pull request:

    https://github.com/apache/flink/pull/5275

    [FLINK-7499][io] fix double buffer release in SpillableSubpartitionView

    ## What is the purpose of the change
    
    This is a rebase of #4581 for the release-1.4 branch. Please refer to the 
original PR for details

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NicoK/flink flink-7499-1.4

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5275.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5275
    
----

----


> double buffer release in SpillableSubpartitionView
> --------------------------------------------------
>
>                 Key: FLINK-7499
>                 URL: https://issues.apache.org/jira/browse/FLINK-7499
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Network
>    Affects Versions: 1.2.0, 1.1.4, 1.3.0, 1.1.5, 1.2.1, 1.2.2, 1.3.1, 1.4.0, 
> 1.3.2, 1.3.3
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>            Priority: Blocker
>             Fix For: 1.5.0
>
>
> {{SpillableSubpartitionView#releaseMemory()}} recycles its buffers twice: 
> once asynchronously after the write operation and once in 
> {{SpillableSubpartitionView#releaseMemory()}} after adding the write 
> operation to the queue.
> 1) if {{SpillableSubpartitionView#releaseMemory()}} hits first and the buffer 
> is recycled, the memory region may already be reused despite the pending write
> 2) If, for some reason (probably only in tests like 
> {{SpillableSubpartitionTest#testConsumeSpillablePartitionSpilledDuringConsume()}}?),
>  the buffer is retained and to be used in parallel somewhere else it may also 
> not be available anymore or contain corrupt data.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to