You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/01/08 11:00:06 UTC

[GitHub] [incubator-hudi] lamber-ken commented on a change in pull request #1128: [HUDI-453] Fix throw failed to archive commits error when writing data to MOR/COW table

lamber-ken commented on a change in pull request #1128: [HUDI-453] Fix throw failed to archive commits error when writing data to MOR/COW table
URL: https://github.com/apache/incubator-hudi/pull/1128#discussion_r364175125
 
 

 ##########
 File path: hudi-client/src/main/java/org/apache/hudi/io/HoodieCommitArchiveLog.java
 ##########
 @@ -249,6 +249,13 @@ public void archive(List<HoodieInstant> instants) throws HoodieCommitException {
       LOG.info("Wrapper schema " + wrapperSchema.toString());
       List<IndexedRecord> records = new ArrayList<>();
       for (HoodieInstant hoodieInstant : instants) {
+
+        // filter empty instant, like *.commit.requested
+        byte[] instantDetails = commitTimeline.getInstantDetails(hoodieInstant).get();
+        if (instantDetails == null || instantDetails.length == 0) {
+          continue;
+        }
+
 
 Review comment:
   @bvaradar Sorry, I probably missed this notification. IMO, it is not logic error, unit tests should not cover it, because we don't create an empty file manually. WDYT?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services