KnightChess commented on code in PR #11631:
URL: https://github.com/apache/hudi/pull/11631#discussion_r1677684690


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/ListingBasedRollbackStrategy.java:
##########
@@ -103,6 +103,10 @@ public List<HoodieRollbackRequest> 
getRollbackRequests(HoodieInstant instantToRo
       if (commitMetadataOptional.isPresent()) {
         isCompaction.set(commitMetadataOptional.get().getOperationType() == 
WriteOperationType.COMPACT);
       }
+      AtomicBoolean isLogCompaction = new AtomicBoolean(false);

Review Comment:
   don't know why need use `AtomicBoolean`, I think there should be no 
concurrency here, reference old logic



##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/MetadataConversionUtils.java:
##########
@@ -255,9 +254,6 @@ public static <T extends SpecificRecordBase> T 
convertCommitMetadata(HoodieCommi
     }
     hoodieCommitMetadata.getPartitionToWriteStats().remove(null);
     org.apache.hudi.avro.model.HoodieCommitMetadata avroMetaData = 
JsonUtils.getObjectMapper().convertValue(hoodieCommitMetadata, 
org.apache.hudi.avro.model.HoodieCommitMetadata.class);
-    if (hoodieCommitMetadata.getCompacted()) {
-      avroMetaData.setOperationType(WriteOperationType.COMPACT.name());
-    }

Review Comment:
   @codope I had check the HoodieCommitMetadata where code is used to set 
compact true, the write operationType all can be set correct, so I think we not 
need check here. 
   like this:
   
![image](https://github.com/user-attachments/assets/a82d8e84-36dc-4e23-b983-251546db1717)
   And guess this is a problem leftover in history, a redundant logic.



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