You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by sn...@apache.org on 2023/11/06 05:06:14 UTC

(pinot) branch master updated: [bugfix]Add logs to track sequence of events for table creation (#11946)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6638d4edcb [bugfix]Add logs to track sequence of events for table creation (#11946)
6638d4edcb is described below

commit 6638d4edcbf61a8078f4a1c2e4be36cc428cc239
Author: aishikbh <ai...@startree.ai>
AuthorDate: Mon Nov 6 10:36:08 2023 +0530

    [bugfix]Add logs to track sequence of events for table creation (#11946)
    
    * Added logs to track sequence of events for table creation
    
    * modified the logs
    
    * modified log alignment
    
    * changed wordings
    
    * adressed PR comments
    
    * rephrased a log line
---
 .../controller/helix/core/PinotHelixResourceManager.java    | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
index 8e1ff52e13..35c942aba6 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
@@ -1562,6 +1562,8 @@ public class PinotHelixResourceManager {
   public void addTable(TableConfig tableConfig)
       throws IOException {
     String tableNameWithType = tableConfig.getTableName();
+    LOGGER.info("Adding table {}: Start", tableNameWithType);
+
     if (getTableConfig(tableNameWithType) != null) {
       throw new TableAlreadyExistsException("Table config for " + tableNameWithType
           + " already exists. If this is unexpected, try deleting the table to remove all metadata associated"
@@ -1573,6 +1575,8 @@ public class PinotHelixResourceManager {
           + "If the external view is not removed after a long time, try restarting the servers showing up in the "
           + "external view");
     }
+
+    LOGGER.info("Adding table {}: Validate table configs", tableNameWithType);
     validateTableTenantConfig(tableConfig);
 
     IdealState idealState =
@@ -1587,18 +1591,23 @@ public class PinotHelixResourceManager {
         "Invalid table type: %s", tableType);
 
     // Add table config
+    LOGGER.info("Adding table {}: Creating table config in the property store", tableNameWithType);
     if (!ZKMetadataProvider.createTableConfig(_propertyStore, tableConfig)) {
       throw new RuntimeException("Failed to create table config for table: " + tableNameWithType);
     }
     try {
       // Assign instances
       assignInstances(tableConfig, true);
+      LOGGER.info("Adding table {}: Assigned instances", tableNameWithType);
+
       if (tableType == TableType.OFFLINE) {
         // Add ideal state
         _helixAdmin.addResource(_helixClusterName, tableNameWithType, idealState);
+        LOGGER.info("Adding table {}: Added ideal state for offline table", tableNameWithType);
       } else {
         // Add ideal state with the first CONSUMING segment
         _pinotLLCRealtimeSegmentManager.setUpNewTable(tableConfig, idealState);
+        LOGGER.info("Adding table {}: Added ideal state with first consuming segment", tableNameWithType);
       }
     } catch (Exception e) {
       LOGGER.error("Caught exception during offline table setup. Cleaning up table {}", tableNameWithType, e);
@@ -1606,7 +1615,7 @@ public class PinotHelixResourceManager {
       throw e;
     }
 
-    LOGGER.info("Updating BrokerResource for table: {}", tableNameWithType);
+    LOGGER.info("Adding table {}: Updating BrokerResource for table", tableNameWithType);
     List<String> brokers =
         HelixHelper.getInstancesWithTag(_helixZkManager, TagNameUtils.extractBrokerTag(tableConfig.getTenantConfig()));
     HelixHelper.updateIdealState(_helixZkManager, Helix.BROKER_RESOURCE_INSTANCE, is -> {
@@ -1616,7 +1625,7 @@ public class PinotHelixResourceManager {
       return is;
     });
 
-    LOGGER.info("Successfully added table: {}", tableNameWithType);
+    LOGGER.info("Adding table {}: Successfully added table", tableNameWithType);
   }
 
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org