zhuzhurk commented on a change in pull request #15229:
URL: https://github.com/apache/flink/pull/15229#discussion_r742571287
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultScheduler.java
##########
@@ -103,6 +104,10 @@
private final Time rpcTimeout;
+ private final Map<AllocationID, Long> reservedAllocationRefCounters;
Review comment:
Using `new HashSet<>(reservedAllocationsByExecutionVertex.values())`
will introduce O(V) complexity. And invoking it V times means a O(V^2)
complexity. (V is the number of tasks.)
`reservedAllocationRefCounters.keySet()` is O(1) because it just creates a
wrapper.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]