You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "saurabhd336 (via GitHub)" <gi...@apache.org> on 2023/06/14 05:47:34 UTC

[GitHub] [pinot] saurabhd336 commented on a diff in pull request #10905: Startree index build enhancement

saurabhd336 commented on code in PR #10905:
URL: https://github.com/apache/pinot/pull/10905#discussion_r1229017691


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/MultipleTreesBuilder.java:
##########
@@ -104,7 +106,7 @@ public MultipleTreesBuilder(@Nullable List<StarTreeIndexConfig> indexConfigs, bo
     _segmentDirectory = SegmentDirectoryPaths.findSegmentDirectory(indexDir);
     _metadataProperties =
         CommonsConfigurationUtils.fromFile(new File(_segmentDirectory, V1Constants.MetadataKeys.METADATA_FILE_NAME));
-    Preconditions.checkState(!_metadataProperties.containsKey(MetadataKey.STAR_TREE_COUNT), "Star-tree already exists");
+    _existingStarTrees = getExistingStarTrees();

Review Comment:
   I see a try catch block on line 109. Will the directory _segment.destroy() handle the cleanup of the new dir we're creating, or should we also be calling _existingStarTrees.cleanupDir() in the catch block?



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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