yashmayya commented on code in PR #17028:
URL: https://github.com/apache/pinot/pull/17028#discussion_r2445608719


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java:
##########
@@ -542,6 +541,10 @@ private void buildStarTreeV2IfNecessary(File indexDir)
           MultipleTreesBuilder builder = new 
MultipleTreesBuilder(starTreeIndexConfigs, enableDefaultStarTree, indexDir,
               buildMode)) {
         builder.build();
+      } catch (Exception e) {
+        String tableNameWithType = _config.getTableConfig().getTableName();
+        LOGGER.error("Failed to build star-tree index for table: {}, 
skipping", tableNameWithType, e);
+        MinionMetrics.get().addMeteredTableValue(tableNameWithType, 
MinionMeter.STAR_TREE_INDEX_BUILD_FAILURES, 1);

Review Comment:
   I think the `build()` method is currently only used by the minion path / 
external segment creation whereas `buildByColumn()` is currently only used by 
the realtime segment converter. The star-tree index creation is done within the 
`handlePostCreation()` method which is called in both the paths so I think we 
do need to avoid using minion metrics here. IMO for now, we could simply pass 
in an `InstanceType` enum indicating whether it's being run on a server or a 
minion and hard code it to minion for `build()` and server for 
`buildByColumn()`. WDYT?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to