codope commented on a change in pull request #4693:
URL: https://github.com/apache/hudi/pull/4693#discussion_r836581277
##########
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:
updated to support dropping while indexing is inflight.
--
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]