[
https://issues.apache.org/jira/browse/FLINK-31420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699671#comment-17699671
]
Weijie Guo edited comment on FLINK-31420 at 3/13/23 3:19 PM:
-------------------------------------------------------------
After checking the code, I found that this is a test code issue. IIUC, This
should be a problem that has existed for a long time, I don't know why it has
not been revealed until now, but the probability of triggering this exception
is very low. I will fix it asap.
The key point is {{ThreadInfoRequestCoordinatorTest#testShutDown}} using two
gateways contains a timeout gateway but expected all request futures not done
before {{shutdown}}. If the timeout reached, this future will be failed, result
in request futures to be done. This makes the test strongly dependent on the
execution order of assertion and timeout, thus causing this test unstable.
was (Author: weijie guo):
After checking the code, I found that this is a test code issue. IIUC, This
should be a problem that has existed for a long time, I don't know why it has
not been revealed until now, but the probability of triggering this exception
is very low. I will fix it asap.
> ThreadInfoRequestCoordinatorTest.testShutDown failed on CI
> ----------------------------------------------------------
>
> Key: FLINK-31420
> URL: https://issues.apache.org/jira/browse/FLINK-31420
> Project: Flink
> Issue Type: Bug
> Components: Runtime / REST
> Affects Versions: 1.16.2
> Reporter: Qingsheng Ren
> Assignee: Weijie Guo
> Priority: Major
>
> [https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=47076&view=logs&j=4d4a0d10-fca2-5507-8eed-c07f0bdf4887&t=7b25afdf-cc6c-566f-5459-359dc2585798&l=8394]
> {code:java}
> Mar 13 03:58:48 [ERROR] Failures:
> Mar 13 03:58:48 [ERROR] ThreadInfoRequestCoordinatorTest.testShutDown:207
> Mar 13 03:58:48 Expecting
> Mar 13 03:58:48 <CompletableFuture[Failed with the following stack trace:
> Mar 13 03:58:48 java.lang.RuntimeException: Discarded
> Mar 13 03:58:48 at
> org.apache.flink.runtime.webmonitor.stats.TaskStatsRequestCoordinator$PendingStatsRequest.discard(TaskStatsRequestCoordinator.java:266)
> Mar 13 03:58:48 at
> org.apache.flink.runtime.webmonitor.stats.TaskStatsRequestCoordinator.handleFailedResponse(TaskStatsRequestCoordinator.java:114)
> Mar 13 03:58:48 at
> org.apache.flink.runtime.webmonitor.threadinfo.ThreadInfoRequestCoordinator.lambda$requestThreadInfo$1(ThreadInfoRequestCoordinator.java:152)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456)
> Mar 13 03:58:48 at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> Mar 13 03:58:48 at
> java.util.concurrent.FutureTask.run(FutureTask.java:266)
> Mar 13 03:58:48 at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> Mar 13 03:58:48 at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> Mar 13 03:58:48 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> Mar 13 03:58:48 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> Mar 13 03:58:48 at java.lang.Thread.run(Thread.java:748)
> Mar 13 03:58:48 Caused by: java.util.concurrent.CompletionException:
> java.util.concurrent.TimeoutException: Request timeout.
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:925)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:913)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
> Mar 13 03:58:48 at
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
> Mar 13 03:58:48 at
> org.apache.flink.runtime.webmonitor.threadinfo.ThreadInfoRequestCoordinatorTest.lambda$createMockTaskManagerGateway$2(ThreadInfoRequestCoordinatorTest.java:259)
> Mar 13 03:58:48 ... 6 more
> Mar 13 03:58:48 Caused by: java.util.concurrent.TimeoutException: Request
> timeout.
> Mar 13 03:58:48 ... 7 more
> Mar 13 03:58:48 ]>
> Mar 13 03:58:48 not to be done.
> Mar 13 03:58:48 Be aware that the state of the future in this message might
> not reflect the one at the time when the assertion was performed as it is
> evaluated later on {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)