You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by yi...@apache.org on 2023/01/19 01:13:35 UTC

[flink] branch master updated: [FLINK-29884][test] Fix flaky test SortMergeResultPartitionTest.testRelease

This is an automated email from the ASF dual-hosted git repository.

yingjie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b8a83ce54d [FLINK-29884][test] Fix flaky test SortMergeResultPartitionTest.testRelease
0b8a83ce54d is described below

commit 0b8a83ce54d39d0d5a5b82573c5037f306e9f7f7
Author: Weijie Guo <re...@163.com>
AuthorDate: Thu Jan 19 09:13:26 2023 +0800

    [FLINK-29884][test] Fix flaky test SortMergeResultPartitionTest.testRelease
    
    If view has read all buffers before result partition release, it will not release itself directly. This may cause the test to timeout under race condition.
    
    This closes #21707.
---
 .../runtime/io/network/partition/SortMergeResultPartitionTest.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionTest.java
index 3139935ab90..6f01823c3fd 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionTest.java
@@ -361,7 +361,7 @@ public class SortMergeResultPartitionTest {
         ResultSubpartitionView view = partition.createSubpartitionView(0, listener);
         partition.release();
 
-        while (!view.isReleased()) {
+        while (!view.isReleased() && partition.getResultFile() != null) {
             ResultSubpartition.BufferAndBacklog bufferAndBacklog = view.getNextBuffer();
             if (bufferAndBacklog != null) {
                 bufferAndBacklog.buffer().recycleBuffer();