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

[GitHub] [hudi] voonhous commented on a diff in pull request #7997: [HUDI-5822] Fix write and read correctness issue when a rollback is performed

voonhous commented on code in PR #7997:
URL: https://github.com/apache/hudi/pull/7997#discussion_r1113914745


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieFileGroup.java:
##########
@@ -148,7 +172,10 @@ public Option<FileSlice> getLatestFileSlicesIncludingInflight() {
    */
   public Stream<FileSlice> getAllFileSlices() {
     if (!timeline.empty()) {
-      return fileSlices.values().stream().filter(this::isFileSliceCommitted);
+      List<String> instantsToRollback = getInstantsToRollbackFromTimeline();
+      return fileSlices.values().stream()
+          .filter(this::isFileSliceCommitted)
+          .filter(s -> !instantsToRollback.contains(s.getBaseInstantTime()));

Review Comment:
   @bvaradar
   
   Understood, am working on a hacky fix for this now... I'll try to avoid touching core APIs for now. 



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