tillrohrmann commented on a change in pull request #13964:
URL: https://github.com/apache/flink/pull/13964#discussion_r544397378



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
##########
@@ -317,11 +317,12 @@ private PhysicalSlot 
reserveFreeSlotForResource(SlotRequestId slotRequestId, All
                                        timeout.toMilliseconds(),
                                        TimeUnit.MILLISECONDS,
                                        componentMainThreadExecutor)
-                               .whenComplete((physicalSlot, throwable) -> {
-                                       if (throwable instanceof 
TimeoutException) {
-                                               
timeoutPendingSlotRequest(slotRequestId);
-                                       }
-                               });
+                               .whenCompleteAsync((physicalSlot, throwable) -> 
{
+                                               if (throwable instanceof 
TimeoutException) {
+                                                       
timeoutPendingSlotRequest(slotRequestId);
+                                               }
+                                       },
+                                       componentMainThreadExecutor);

Review comment:
       After an offline discussion with Chesnay we concluded that this is not 
the fix for the problem. Instead we will try to not expose futures which have 
other dependents because this can lead to violating the main thread guarantee 
when waiting on this future outside of the main thread (`get()` will try to 
complete the future's dependents).




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to