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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/MultipleTreesBuilder.java:
##########
@@ -83,7 +86,11 @@ public MultipleTreesBuilder(List<StarTreeV2BuilderConfig> 
builderConfigs, File i
     _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");
+    _separator = getSeparator();
+    if (_separator != null) {
+      StarTreeBuilderUtils.removeStarTrees(indexDir);
+      _metadataProperties.reload();

Review Comment:
   To ensure that the startree index props removed by 
`StarTreeBuilderUtils.removeStarTrees` are reflected in the 
`_metadataProperties`.



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