zhuzhurk commented on a change in pull request #16959:
URL: https://github.com/apache/flink/pull/16959#discussion_r696381040



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DefaultDeclarativeSlotPool.java
##########
@@ -117,7 +117,7 @@ public void increaseResourceRequirementsBy(ResourceCounter 
increment) {
 
     @Override
     public void decreaseResourceRequirementsBy(ResourceCounter decrement) {
-        if (decrement.isEmpty()) {
+        if (decrement.isEmpty() || totalResourceRequirements.isEmpty()) {

Review comment:
       Looks to me this is a critical bug. If TM is disconnected with available 
slots during job execution, the job may never be able to declare right resource 
requirements again.
   I wrote a rough test to show this case. You can check the log to see the 
resource declaration that after a failover, the job with parallelism=3 will 
only declare resources for 2 slots.




-- 
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-unsubscr...@flink.apache.org

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


Reply via email to