prashantwason commented on a change in pull request #2064:
URL: https://github.com/apache/hudi/pull/2064#discussion_r491217748



##########
File path: 
hudi-client/src/main/java/org/apache/hudi/table/action/clean/CleanActionExecutor.java
##########
@@ -244,6 +245,10 @@ private HoodieCleanMetadata runClean(HoodieTable<?> table, 
HoodieInstant cleanIn
         inflightInstant = cleanInstant;
       }
 
+      // Update Metadata Table before even finishing clean. This ensures that 
an async clean operation in the
+      // background does not lead to stale metadata being returned from 
Metadata Table.
+      HoodieMetadata.update(config, cleanerPlan, cleanInstant.getTimestamp());

Review comment:
       I dont have Async tests yet. 
   
   We need to decide where to log update for async operations. If we do it at 
Async operation completion then we may end up in multi writer scenario. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to