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

xyuanlu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c3033dd2 [apache/helix] --Enable logging of critical unrecovered 
partitions during handoff within threshold. (#2708)
0c3033dd2 is described below

commit 0c3033dd2bd66b168b8af6f68fa3e2ff4e2ca738
Author: Himanshu Kandwal <[email protected]>
AuthorDate: Tue Dec 12 10:10:18 2023 -0800

    [apache/helix] --Enable logging of critical unrecovered partitions during 
handoff within threshold. (#2708)
---
 .../helix/controller/stages/TopStateHandoffReportStage.java      | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java
 
b/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java
index c58f40e41..ac5a76b1e 100644
--- 
a/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java
+++ 
b/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java
@@ -48,6 +48,8 @@ public class TopStateHandoffReportStage extends 
AbstractAsyncBaseStage {
   private static Logger LOG = 
LoggerFactory.getLogger(TopStateHandoffReportStage.class);
   public static final long TIMESTAMP_NOT_RECORDED = -1L;
 
+  private Map<String, Long> _failingPartitionsInfoMap = new HashMap<>();
+
   @Override
   public AsyncWorkerType getAsyncWorkerType() {
     return AsyncWorkerType.TopStateHandoffReportWorker;
@@ -106,6 +108,7 @@ public class TopStateHandoffReportStage extends 
AbstractAsyncBaseStage {
       }
 
       String resourceName = resource.getResourceName();
+      _failingPartitionsInfoMap.clear();
 
       for (Partition partition : resource.getPartitions()) {
         String currentTopStateInstance =
@@ -124,6 +127,10 @@ public class TopStateHandoffReportStage extends 
AbstractAsyncBaseStage {
               clusterStatusMonitor);
         }
       }
+
+      if (!_failingPartitionsInfoMap.isEmpty()) {
+        LogUtil.logInfo(LOG, _eventId, String.format("Missing top state for 
partitions: %s", _failingPartitionsInfoMap));
+      }
     }
 
     if (clusterStatusMonitor != null) {
@@ -334,6 +341,8 @@ public class TopStateHandoffReportStage extends 
AbstractAsyncBaseStage {
       LogUtil.logDebug(LOG, _eventId, String.format(
           "Missing top state for partition %s beyond %s time. Graceful: %s",
           partitionName, missingDuration, false));
+      _failingPartitionsInfoMap.put(partitionName, missingDuration);
+
       if (clusterStatusMonitor != null) {
         clusterStatusMonitor.updateMissingTopStateDurationStats(resourceName, 
0L, 0L,
             false, false);

Reply via email to