tillrohrmann commented on a change in pull request #10923: [FLINK-15691][tests]
Remove runInTaskExecutorThreadAndWait()
URL: https://github.com/apache/flink/pull/10923#discussion_r369668495
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
##########
@@ -254,7 +249,7 @@ public void testPartitionPromotion() throws Exception {
testPartitionRelease(
(jobId, partitionId, taskExecutor, taskExecutorGateway,
partitionTracker) -> {
final
CompletableFuture<Collection<ResultPartitionID>> releasePartitionsFuture = new
CompletableFuture<>();
- runInTaskExecutorThreadAndWait(taskExecutor, ()
->
partitionTracker.setPromotePartitionsConsumer(releasePartitionsFuture::complete));
+
partitionTracker.setPromotePartitionsConsumer(releasePartitionsFuture::complete);
Review comment:
I think this is not 100% correct as the internal
`TestingTaskExecutorPartitionTracker#promotePartitionsConsumer` field is not
volatile. Hence, the `TaskExecutor` might read a stale value. I would suggest
to either setup these things before creating the `TaskExecutor` or if this is
not possible, then make the fields volatile.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services