bvaradar 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_r361734393
##########
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:
@lamber-ken : We did not catch this in our unit-tests because I had
inadvertently created requested files with proper commit metadata for test data
generation. Please look at HoodieTestDataGenerator.createCommitFile(). Can you
also fix this as part of this PR so that only empty requested commit files are
present ?
----------------------------------------------------------------
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]
With regards,
Apache Git Services