[ 
https://issues.apache.org/jira/browse/FLINK-40790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119235#comment-18119235
 ] 

sepuri sai krishna commented on FLINK-40790:
--------------------------------------------

The test assumes both `increaseResourceRequirementsBy` calls land inside 
`slotRequestMaxInterval`, which is 50 ms in this parameter. Each call schedules 
the declaration and cancels the pending one, so a stall between them declares 
the first increment on its own. Sleeping 150 ms between the two calls 
reproduces the failure exactly.

I have a fix that drives the batching window with a 
`ManuallyTriggeredScheduledExecutor` instead of wall-clock time. Could you 
assign this to me? PR coming shortly.

> DefaultDeclarativeSlotPoolTest.testIncreasingResourceRequirementsWillSendResourceRequirementNotification
>  receives the first increment alone
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-40790
>                 URL: https://issues.apache.org/jira/browse/FLINK-40790
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 2.4.0
>            Reporter: Martijn Visser
>            Priority: Major
>
> https://github.com/apache/flink/actions/runs/35493621721/job/106033628963 
> (master push 2026-09-20, JDK 17, module core)
> {code}
> [ERROR] 
> org.apache.flink.runtime.jobmaster.slotpool.DefaultDeclarativeSlotPoolTest.testIncreasingResourceRequirementsWillSendResourceRequirementNotification
>  -- Time elapsed: 0.333 s <<< FAILURE!
> org.opentest4j.AssertionFailedError:
> expected:
>   [ResourceRequirement{resourceProfile=ResourceProfile{cpuCores=1.7, 
> taskHeapMemory=0 bytes, taskOffHeapMemory=0 bytes, managedMemory=0 bytes, 
> networkMemory=0 bytes}, numberOfRequiredSlots=3},
>       ResourceRequirement{resourceProfile=ResourceProfile{cpuCores=0, 
> taskHeapMemory=0 bytes, taskOffHeapMemory=0 bytes, managedMemory=100.000mb 
> (104857600 bytes), networkMemory=0 bytes}, numberOfRequiredSlots=1}]
>  but was:
>   [ResourceRequirement{resourceProfile=ResourceProfile{cpuCores=1.7, 
> taskHeapMemory=0 bytes, taskOffHeapMemory=0 bytes, managedMemory=0 bytes, 
> networkMemory=0 bytes}, numberOfRequiredSlots=1}]
>         at 
> org.apache.flink.runtime.jobmaster.slotpool.DefaultDeclarativeSlotPoolTest.testIncreasingResourceRequirementsWillSendResourceRequirementNotification(DefaultDeclarativeSlotPoolTest.java:88)
> {code}
> The merged expectation only applies to the slotRequestMaxInterval = 50 ms 
> parameter, so this is that case: the two increaseResourceRequirementsBy calls 
> were not batched into one notification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to