RexXiong commented on code in PR #3099:
URL: https://github.com/apache/celeborn/pull/3099#discussion_r1967106494


##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java:
##########
@@ -599,15 +594,29 @@ private void resumeByPinnedMemory(ServingState 
servingState) {
     }
   }
 
-  private boolean canResumeByPinnedMemory() {
-    if (pinnedMemoryCheckEnabled
-        && System.currentTimeMillis() - pinnedMemoryLastCheckTime >= 
pinnedMemoryCheckInterval
-        && getPinnedMemory() / (double) (maxDirectMemory) < 
pinnedMemoryResumeRatio) {
-      pinnedMemoryLastCheckTime = System.currentTimeMillis();
-      return true;
-    } else {
+  private boolean tryResumeByPinnedMemory(ServingState currentState, 
ServingState lastState) {
+    boolean success = false;
+    if (!pinnedMemoryCheckEnabled) {
       return false;
     }
+    if (System.currentTimeMillis() - pinnedMemoryLastCheckTime >= 
pinnedMemoryCheckInterval) {

Review Comment:
   introduce a variable for `System.currentTimeMillis()` ?



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