You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "reswqa (via GitHub)" <gi...@apache.org> on 2023/04/28 04:24:23 UTC

[GitHub] [flink] reswqa commented on a diff in pull request #22495: [FLINK-31080][Flink-runtime]Idle slots are not released due to a mismatch in time between DeclarativeSlotPoolService and SlotSharingSlotAllocator

reswqa commented on code in PR #22495:
URL: https://github.com/apache/flink/pull/22495#discussion_r1179914378


##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolService.java:
##########
@@ -134,7 +139,25 @@ public final void start(
      *
      * @param componentMainThreadExecutor componentMainThreadExecutor used by this slot pool service
      */
-    protected void onStart(ComponentMainThreadExecutor componentMainThreadExecutor) {}
+    protected void onStart(ComponentMainThreadExecutor componentMainThreadExecutor) {
+        this.componentMainThreadExecutor = componentMainThreadExecutor;
+
+        componentMainThreadExecutor.schedule(
+                this::checkIdleSlotTimeout,
+                idleSlotTimeout.toMilliseconds(),
+                TimeUnit.MILLISECONDS);

Review Comment:
   IIUC, you want to move the idle slot check logic from `AdaptiveScheduler` to `DeclarativeSlotPoolService`. But you didn't remove the code there, this is what confuses me. And It seems that this change is not completely aligned with FLINK-32399, is this safe?



-- 
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