codope commented on a change in pull request #4693: URL: https://github.com/apache/hudi/pull/4693#discussion_r835763190
########## File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java ########## @@ -645,12 +669,36 @@ private void initializeFileGroups(HoodieTableMetaClient dataMetaClient, Metadata } } + public void dropIndex(List<MetadataPartitionType> indexesToDrop) throws IOException { + Set<String> completedIndexes = Stream.of(dataMetaClient.getTableConfig().getCompletedMetadataIndexes().split(",")) + .map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toSet()); + Set<String> inflightIndexes = Stream.of(dataMetaClient.getTableConfig().getInflightMetadataIndexes().split(",")) + .map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toSet()); + for (MetadataPartitionType partitionType : indexesToDrop) { + String partitionPath = partitionType.getPartitionPath(); + if (inflightIndexes.contains(partitionPath)) { + LOG.error("Metadata indexing in progress: " + partitionPath); Review comment: yes we can, but i was leaning more towards letting the indexer succeed so that user can only drop index from a clean state. Are you thinking about scenario when index building is taking time and user wants to simply abort that? -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org