You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/02/11 04:13:44 UTC

[GitHub] [hudi] codope commented on a diff in pull request #7921: [HUDI-5764] Roll back delta commits from `HoodieIndexer` lazily in metadata table

codope commented on code in PR #7921:
URL: https://github.com/apache/hudi/pull/7921#discussion_r1103490799


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieTableServiceClient.java:
##########
@@ -811,6 +860,11 @@ private Option<String> delegateToTableServiceManager(TableServiceType tableServi
     }
   }
 
+  private boolean isDeltaCommitFromIndexing(String instantTime) {

Review Comment:
   Minor: rename to 'isIndexerCommit' and move to HoodieTableMetadataUtil?



##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/TestHoodieIndexer.java:
##########
@@ -147,6 +148,26 @@ public void testIndexerWithFilesPartition() {
     indexMetadataPartitionsAndAssert(FILES, Collections.emptyList(), Arrays.asList(new MetadataPartitionType[] {COLUMN_STATS, BLOOM_FILTERS}), tableName);
   }
 
+  @Test
+  public void testIndexerWithWriter() {
+    // Test the case where the indexer is running, i.e., the delta commit in the metadata table
+    // is inflight, while the regular writer is updating metadata table.
+    // The delta commit from the indexer should not be rolled back.
+    String tableName = "indexer_with_writer";
+    // enable files and bloom_filters on the regular write client
+    HoodieMetadataConfig.Builder metadataConfigBuilder =
+        getMetadataConfigBuilder(true, false).withMetadataIndexBloomFilter(true);
+    upsertToTable(metadataConfigBuilder.build(), tableName);
+
+    // validate table config
+    assertTrue(reload(metaClient).getTableConfig().getMetadataPartitions().contains(FILES.getPartitionPath()));
+    assertTrue(reload(metaClient).getTableConfig().getMetadataPartitions().contains(BLOOM_FILTERS.getPartitionPath()));
+
+    scheduleAndExecuteIndexing(COLUMN_STATS, tableName);
+    // metaClient.getActiveTimeline().filter(i -> i.getAction())

Review Comment:
   let's remove these.



-- 
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@hudi.apache.org

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