nsivabalan commented on code in PR #12424:
URL: https://github.com/apache/hudi/pull/12424#discussion_r1870456171


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/BaseActionExecutor.java:
##########
@@ -161,4 +161,15 @@ protected final void dropIndexOnRestore() {
       }
     }
   }
+
+  protected final void disableWriteRecordPositionsWithPendingCompaction() {

Review Comment:
   we also need to disable write positions when nbcc is enabled. 



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestMORDataSourceStorage.scala:
##########
@@ -184,4 +190,125 @@ class TestMORDataSourceStorage extends 
SparkClientFunctionalTestHarness {
     val metaClient = HoodieTestUtils.createMetaClient(new 
HadoopStorageConfiguration(fs.getConf), basePath)
     assertEquals(1, 
metaClient.getActiveTimeline.getCommitAndReplaceTimeline.countInstants())
   }
+
+  @Test
+  def testAutoDisablingRecordPositionsUnderPendingCompaction(): Unit = {
+    val options = Map(
+      "hoodie.insert.shuffle.parallelism" -> "4",
+      "hoodie.upsert.shuffle.parallelism" -> "4",
+      "hoodie.bulkinsert.shuffle.parallelism" -> "2",
+      "hoodie.delete.shuffle.parallelism" -> "1",
+      "hoodie.merge.small.file.group.candidates.limit" -> "0",
+      HoodieWriteConfig.WRITE_RECORD_POSITIONS.key -> "true",
+      DataSourceWriteOptions.RECORDKEY_FIELD.key -> "_row_key",
+      DataSourceWriteOptions.KEYGENERATOR_CLASS_NAME.key -> 
classOf[NonpartitionedKeyGenerator].getName,
+      DataSourceWriteOptions.PRECOMBINE_FIELD.key -> "timestamp",
+      HoodieWriteConfig.TBL_NAME.key -> "hoodie_test"
+    )
+    val optionWithoutCompactionExecution = options ++ Map(

Review Comment:
   nice. I did not think we can leverage this in tests. 



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

Reply via email to