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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerConfiguration.java:
##########
@@ -244,7 +244,12 @@ private static MemorySize getMaxTotalMem(
                                         ? MemorySize.MAX_VALUE
                                         : defaultWorkerResourceSpec
                                                 .getTotalMemSize()
-                                                
.divide(defaultWorkerResourceSpec.getNumSlots())
-                                                .multiply(maxSlotNum));
+                                                // In theory, there is a 
possibility of long

Review Comment:
   `CPUResource` uses `BigDecimal` internally, while `MemorySize` is actually 
stored in `long`. IIUC, `getMaxTotalCpu` should be 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to