This is an automated email from the ASF dual-hosted git repository.

zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new e2c42faed [CELEBORN-934] Make the log description in 
switchServingState more precise
e2c42faed is described below

commit e2c42faed9b268de38420ed94fe64a3b09a940d4
Author: jiaoqingbo <[email protected]>
AuthorDate: Wed Aug 30 14:27:20 2023 +0800

    [CELEBORN-934] Make the log description in switchServingState more precise
    
    ### What changes were proposed in this pull request?
    
    Modify log content and location to accurately describe state changes
    
    ### Why are the changes needed?
    
    In the previous implementation, when servingState was PUSH_PAUSED and 
lastState was PUSH_AND_REPLICATE_PAUSED, the code only triggered the Resume of 
REPLICATE_MODULE, but the log showed "Trigger action: PAUSE PUSH, RESUME 
REPLICATE"
    
    The above log content is not accurate
    
    ### Does this PR introduce _any_ user-facing change?
    
    NO
    
    ### How was this patch tested?
    
    PASS GA
    
    Closes #1864 from jiaoqingbo/934.
    
    Authored-by: jiaoqingbo <[email protected]>
    Signed-off-by: zky.zhoukeyong <[email protected]>
---
 .../celeborn/service/deploy/worker/memory/MemoryManager.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
 
b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
index cb248dd9b..ac87db327 100644
--- 
a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
+++ 
b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
@@ -255,12 +255,13 @@ public class MemoryManager {
     switch (servingState) {
       case PUSH_PAUSED:
         pausePushDataCounter.increment();
-        logger.info("Trigger action: PAUSE PUSH, RESUME REPLICATE");
         if (lastState == ServingState.PUSH_AND_REPLICATE_PAUSED) {
+          logger.info("Trigger action: RESUME REPLICATE");
           memoryPressureListeners.forEach(
               memoryPressureListener ->
                   
memoryPressureListener.onResume(TransportModuleConstants.REPLICATE_MODULE));
         } else if (lastState == ServingState.NONE_PAUSED) {
+          logger.info("Trigger action: PAUSE PUSH");
           memoryPressureListeners.forEach(
               memoryPressureListener ->
                   
memoryPressureListener.onPause(TransportModuleConstants.PUSH_MODULE));
@@ -269,24 +270,26 @@ public class MemoryManager {
         break;
       case PUSH_AND_REPLICATE_PAUSED:
         pausePushDataAndReplicateCounter.increment();
-        logger.info("Trigger action: PAUSE PUSH and REPLICATE");
         if (lastState == ServingState.NONE_PAUSED) {
+          logger.info("Trigger action: PAUSE PUSH");
           memoryPressureListeners.forEach(
               memoryPressureListener ->
                   
memoryPressureListener.onPause(TransportModuleConstants.PUSH_MODULE));
         }
+        logger.info("Trigger action: PAUSE REPLICATE");
         memoryPressureListeners.forEach(
             memoryPressureListener ->
                 
memoryPressureListener.onPause(TransportModuleConstants.REPLICATE_MODULE));
         trimAllListeners();
         break;
       case NONE_PAUSED:
-        logger.info("Trigger action: RESUME PUSH and REPLICATE");
         if (lastState == ServingState.PUSH_AND_REPLICATE_PAUSED) {
+          logger.info("Trigger action: RESUME REPLICATE");
           memoryPressureListeners.forEach(
               memoryPressureListener ->
                   
memoryPressureListener.onResume(TransportModuleConstants.REPLICATE_MODULE));
         }
+        logger.info("Trigger action: RESUME PUSH");
         memoryPressureListeners.forEach(
             memoryPressureListener ->
                 
memoryPressureListener.onResume(TransportModuleConstants.PUSH_MODULE));

Reply via email to