You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/31 16:50:46 UTC

[GitHub] [flink] pnowojski opened a new pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

pnowojski opened a new pull request #18575:
URL: https://github.com/apache/flink/pull/18575


   SourceOperator.SourceOperatorAvailabilityHelper is prone to the same type of memory leak as FLINK-25728. Every time new CompletableFuture.any is created:
   ```
                   currentCombinedFuture =
                           CompletableFuture.anyOf(forcedStopFuture, sourceReaderFuture);
                   return currentCombinedFuture;
   ```
   Such future is never garbage collected, because forcedStopFuture will keep a reference to it. This will eventually lead to a memory leak, or force stopping might take very long time to complete.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (**yes** / no / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "de720988f611ead1b45bca07376452efedcab76d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608",
       "triggerID" : "de720988f611ead1b45bca07376452efedcab76d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "18023c080efe7ade0b9a9d6763c429924fa0da5f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30705",
       "triggerID" : "18023c080efe7ade0b9a9d6763c429924fa0da5f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * de720988f611ead1b45bca07376452efedcab76d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608) 
   * 18023c080efe7ade0b9a9d6763c429924fa0da5f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30705) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #18575:
URL: https://github.com/apache/flink/pull/18575#discussion_r796836332



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/MultipleFuturesAvailabilityHelper.java
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import java.util.concurrent.CompletableFuture;
+
+import static org.apache.flink.util.concurrent.FutureUtils.assertNoException;
+
+/**
+ * This class is semi-thread safe. Only method {@link #notifyCompletion()} is allowed to be executed
+ * from an outside of the task thread.
+ *
+ * <p>It solves a problem of a potential memory leak as described in FLINK-25728. In short we have
+ * to ensure, that if there is one input (future) that rarely (or never) completes, that such future
+ * would not prevent previously returned combined futures (like {@link
+ * CompletableFuture#anyOf(CompletableFuture[])} from being garbage collected. Additionally, we
+ * don't want to accumulate more and more completion stages on such rarely completed future, so we
+ * are registering {@link CompletableFuture#thenRun(Runnable)} only if it has not already been done.
+ *
+ * <p>Note {@link #resetToUnAvailable()} doesn't de register previously registered futures. If
+ * future was registered in the past, but for whatever reason now it is not, such future can still
+ * complete the newly created future.
+ *
+ * <p>It might be no longer needed after upgrading to JDK9
+ * (https://bugs.openjdk.java.net/browse/JDK-8160402).
+ */
+public class MultipleFuturesAvailabilityHelper {

Review comment:
       `@Internal`

##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/SourceOperatorTestBase.java
##########
@@ -0,0 +1,129 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package org.apache.flink.streaming.api.operators;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.state.OperatorStateStore;
+import org.apache.flink.api.connector.source.mocks.MockSourceReader;
+import org.apache.flink.api.connector.source.mocks.MockSourceSplit;
+import org.apache.flink.api.connector.source.mocks.MockSourceSplitSerializer;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.CloseableRegistry;
+import org.apache.flink.core.io.SimpleVersionedSerialization;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.operators.coordination.MockOperatorEventGateway;
+import org.apache.flink.runtime.operators.testutils.MockEnvironment;
+import org.apache.flink.runtime.operators.testutils.MockEnvironmentBuilder;
+import org.apache.flink.runtime.operators.testutils.MockInputSplitProvider;
+import org.apache.flink.runtime.state.AbstractStateBackend;
+import org.apache.flink.runtime.state.StateInitializationContext;
+import org.apache.flink.runtime.state.StateInitializationContextImpl;
+import org.apache.flink.runtime.state.TestTaskStateManager;
+import org.apache.flink.runtime.state.memory.MemoryStateBackend;
+import org.apache.flink.streaming.api.operators.source.TestingSourceOperator;
+import org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask;
+import org.apache.flink.streaming.runtime.tasks.StreamMockEnvironment;
+import org.apache.flink.streaming.util.MockOutput;
+import org.apache.flink.streaming.util.MockStreamConfig;
+
+import org.junit.After;
+import org.junit.Before;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import static org.junit.Assert.assertTrue;
+
+/** Base class for testing {@link SourceOperator}. */
+@SuppressWarnings("serial")
+public class SourceOperatorTestBase {

Review comment:
       `abstract`?

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/MultipleFuturesAvailabilityHelper.java
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import java.util.concurrent.CompletableFuture;
+
+import static org.apache.flink.util.concurrent.FutureUtils.assertNoException;
+
+/**
+ * This class is semi-thread safe. Only method {@link #notifyCompletion()} is allowed to be executed
+ * from an outside of the task thread.
+ *
+ * <p>It solves a problem of a potential memory leak as described in FLINK-25728. In short we have
+ * to ensure, that if there is one input (future) that rarely (or never) completes, that such future
+ * would not prevent previously returned combined futures (like {@link
+ * CompletableFuture#anyOf(CompletableFuture[])} from being garbage collected. Additionally, we
+ * don't want to accumulate more and more completion stages on such rarely completed future, so we
+ * are registering {@link CompletableFuture#thenRun(Runnable)} only if it has not already been done.
+ *
+ * <p>Note {@link #resetToUnAvailable()} doesn't de register previously registered futures. If
+ * future was registered in the past, but for whatever reason now it is not, such future can still
+ * complete the newly created future.
+ *
+ * <p>It might be no longer needed after upgrading to JDK9
+ * (https://bugs.openjdk.java.net/browse/JDK-8160402).
+ */
+public class MultipleFuturesAvailabilityHelper {
+    private final CompletableFuture<?>[] futuresToCombine;
+
+    private volatile CompletableFuture<?> availableFuture = new CompletableFuture<>();
+
+    public MultipleFuturesAvailabilityHelper(int size) {
+        futuresToCombine = new CompletableFuture[size];
+    }
+
+    /** @return combined future using anyOf logic */
+    public CompletableFuture<?> getAvailableFuture() {
+        return availableFuture;
+    }
+
+    public void resetToUnAvailable() {
+        if (availableFuture.isDone()) {
+            availableFuture = new CompletableFuture<>();
+        }
+    }
+
+    private void notifyCompletion() {
+        availableFuture.complete(null);
+    }
+
+    /**
+     * Combine {@code availabilityFuture} using anyOf logic with other previously registered
+     * futures.
+     */
+    public void anyOf(final int idx, CompletableFuture<?> availabilityFuture) {

Review comment:
       nit: Would `or` make more sense instead of `anyOf`? In `anyOf` I'd expect a collection of futures. This is a really nitty nit though.

##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/SourceOperatorTestBase.java
##########
@@ -0,0 +1,129 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package org.apache.flink.streaming.api.operators;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.state.OperatorStateStore;
+import org.apache.flink.api.connector.source.mocks.MockSourceReader;
+import org.apache.flink.api.connector.source.mocks.MockSourceSplit;
+import org.apache.flink.api.connector.source.mocks.MockSourceSplitSerializer;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.CloseableRegistry;
+import org.apache.flink.core.io.SimpleVersionedSerialization;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.operators.coordination.MockOperatorEventGateway;
+import org.apache.flink.runtime.operators.testutils.MockEnvironment;
+import org.apache.flink.runtime.operators.testutils.MockEnvironmentBuilder;
+import org.apache.flink.runtime.operators.testutils.MockInputSplitProvider;
+import org.apache.flink.runtime.state.AbstractStateBackend;
+import org.apache.flink.runtime.state.StateInitializationContext;
+import org.apache.flink.runtime.state.StateInitializationContextImpl;
+import org.apache.flink.runtime.state.TestTaskStateManager;
+import org.apache.flink.runtime.state.memory.MemoryStateBackend;
+import org.apache.flink.streaming.api.operators.source.TestingSourceOperator;
+import org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask;
+import org.apache.flink.streaming.runtime.tasks.StreamMockEnvironment;
+import org.apache.flink.streaming.util.MockOutput;
+import org.apache.flink.streaming.util.MockStreamConfig;
+
+import org.junit.After;
+import org.junit.Before;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import static org.junit.Assert.assertTrue;
+
+/** Base class for testing {@link SourceOperator}. */
+@SuppressWarnings("serial")
+public class SourceOperatorTestBase {

Review comment:
       Or even better, could we convert it to e.g. `SourceOperatorTestContext` and apply composition instead of inheritance? There is no test logic in the class, but just a setup. We could probably make it extend from `BeforeEach/AfterEach` of Junit 5, but I'd be also fine with just calling the setup/close methods in classes that use this "base".




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 933476ea297f1c2dc7d2c6a5c05b97980314bb38 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "de720988f611ead1b45bca07376452efedcab76d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608",
       "triggerID" : "de720988f611ead1b45bca07376452efedcab76d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7829141285dc11e44799080155ab037f18d76b7b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577) 
   * de720988f611ead1b45bca07376452efedcab76d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 933476ea297f1c2dc7d2c6a5c05b97980314bb38 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7829141285dc11e44799080155ab037f18d76b7b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "de720988f611ead1b45bca07376452efedcab76d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "de720988f611ead1b45bca07376452efedcab76d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7829141285dc11e44799080155ab037f18d76b7b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577) 
   * de720988f611ead1b45bca07376452efedcab76d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "239f0a47ea4cefeb0cbf6bd2bf3bd3cb8cf7d25d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "239f0a47ea4cefeb0cbf6bd2bf3bd3cb8cf7d25d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7829141285dc11e44799080155ab037f18d76b7b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577) 
   * 239f0a47ea4cefeb0cbf6bd2bf3bd3cb8cf7d25d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "de720988f611ead1b45bca07376452efedcab76d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608",
       "triggerID" : "de720988f611ead1b45bca07376452efedcab76d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "18023c080efe7ade0b9a9d6763c429924fa0da5f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "18023c080efe7ade0b9a9d6763c429924fa0da5f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * de720988f611ead1b45bca07376452efedcab76d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608) 
   * 18023c080efe7ade0b9a9d6763c429924fa0da5f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] pnowojski merged pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
pnowojski merged pull request #18575:
URL: https://github.com/apache/flink/pull/18575


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 933476ea297f1c2dc7d2c6a5c05b97980314bb38 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "de720988f611ead1b45bca07376452efedcab76d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608",
       "triggerID" : "de720988f611ead1b45bca07376452efedcab76d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * de720988f611ead1b45bca07376452efedcab76d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] pnowojski commented on a change in pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
pnowojski commented on a change in pull request #18575:
URL: https://github.com/apache/flink/pull/18575#discussion_r797354154



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/MultipleFuturesAvailabilityHelper.java
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import java.util.concurrent.CompletableFuture;
+
+import static org.apache.flink.util.concurrent.FutureUtils.assertNoException;
+
+/**
+ * This class is semi-thread safe. Only method {@link #notifyCompletion()} is allowed to be executed
+ * from an outside of the task thread.
+ *
+ * <p>It solves a problem of a potential memory leak as described in FLINK-25728. In short we have
+ * to ensure, that if there is one input (future) that rarely (or never) completes, that such future
+ * would not prevent previously returned combined futures (like {@link
+ * CompletableFuture#anyOf(CompletableFuture[])} from being garbage collected. Additionally, we
+ * don't want to accumulate more and more completion stages on such rarely completed future, so we
+ * are registering {@link CompletableFuture#thenRun(Runnable)} only if it has not already been done.
+ *
+ * <p>Note {@link #resetToUnAvailable()} doesn't de register previously registered futures. If
+ * future was registered in the past, but for whatever reason now it is not, such future can still
+ * complete the newly created future.
+ *
+ * <p>It might be no longer needed after upgrading to JDK9
+ * (https://bugs.openjdk.java.net/browse/JDK-8160402).
+ */
+public class MultipleFuturesAvailabilityHelper {
+    private final CompletableFuture<?>[] futuresToCombine;
+
+    private volatile CompletableFuture<?> availableFuture = new CompletableFuture<>();
+
+    public MultipleFuturesAvailabilityHelper(int size) {
+        futuresToCombine = new CompletableFuture[size];
+    }
+
+    /** @return combined future using anyOf logic */
+    public CompletableFuture<?> getAvailableFuture() {
+        return availableFuture;
+    }
+
+    public void resetToUnAvailable() {
+        if (availableFuture.isDone()) {
+            availableFuture = new CompletableFuture<>();
+        }
+    }
+
+    private void notifyCompletion() {
+        availableFuture.complete(null);
+    }
+
+    /**
+     * Combine {@code availabilityFuture} using anyOf logic with other previously registered
+     * futures.
+     */
+    public void anyOf(final int idx, CompletableFuture<?> availabilityFuture) {

Review comment:
       I wanted to preserve the original contributors choice here. As I understand this is in order to more resemble `CompleteableFuture.anyOf(...)`. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] pnowojski commented on a change in pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
pnowojski commented on a change in pull request #18575:
URL: https://github.com/apache/flink/pull/18575#discussion_r797370556



##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/SourceOperatorTestBase.java
##########
@@ -0,0 +1,129 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package org.apache.flink.streaming.api.operators;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.state.OperatorStateStore;
+import org.apache.flink.api.connector.source.mocks.MockSourceReader;
+import org.apache.flink.api.connector.source.mocks.MockSourceSplit;
+import org.apache.flink.api.connector.source.mocks.MockSourceSplitSerializer;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.CloseableRegistry;
+import org.apache.flink.core.io.SimpleVersionedSerialization;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.operators.coordination.MockOperatorEventGateway;
+import org.apache.flink.runtime.operators.testutils.MockEnvironment;
+import org.apache.flink.runtime.operators.testutils.MockEnvironmentBuilder;
+import org.apache.flink.runtime.operators.testutils.MockInputSplitProvider;
+import org.apache.flink.runtime.state.AbstractStateBackend;
+import org.apache.flink.runtime.state.StateInitializationContext;
+import org.apache.flink.runtime.state.StateInitializationContextImpl;
+import org.apache.flink.runtime.state.TestTaskStateManager;
+import org.apache.flink.runtime.state.memory.MemoryStateBackend;
+import org.apache.flink.streaming.api.operators.source.TestingSourceOperator;
+import org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask;
+import org.apache.flink.streaming.runtime.tasks.StreamMockEnvironment;
+import org.apache.flink.streaming.util.MockOutput;
+import org.apache.flink.streaming.util.MockStreamConfig;
+
+import org.junit.After;
+import org.junit.Before;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import static org.junit.Assert.assertTrue;
+
+/** Base class for testing {@link SourceOperator}. */
+@SuppressWarnings("serial")
+public class SourceOperatorTestBase {

Review comment:
       Done, @dawidwys can you take a look at the improved version?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025992155


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 933476ea297f1c2dc7d2c6a5c05b97980314bb38 (Mon Jan 31 16:54:24 UTC 2022)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 933476ea297f1c2dc7d2c6a5c05b97980314bb38 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536) 
   * 7829141285dc11e44799080155ab037f18d76b7b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 933476ea297f1c2dc7d2c6a5c05b97980314bb38 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536) 
   * 7829141285dc11e44799080155ab037f18d76b7b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #18575: [FLINK-25827][task] Fix potential memory leak in SourceOperator when using CompletableFuture.anyOf

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #18575:
URL: https://github.com/apache/flink/pull/18575#issuecomment-1025993745


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30536",
       "triggerID" : "933476ea297f1c2dc7d2c6a5c05b97980314bb38",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7829141285dc11e44799080155ab037f18d76b7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30577",
       "triggerID" : "7829141285dc11e44799080155ab037f18d76b7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "de720988f611ead1b45bca07376452efedcab76d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30608",
       "triggerID" : "de720988f611ead1b45bca07376452efedcab76d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "18023c080efe7ade0b9a9d6763c429924fa0da5f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30705",
       "triggerID" : "18023c080efe7ade0b9a9d6763c429924fa0da5f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 18023c080efe7ade0b9a9d6763c429924fa0da5f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=30705) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org