Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUDI-5336] Fixing log file pattern match to ignore extraneous files #7612

Merged

Conversation

nsivabalan
Copy link
Contributor

@nsivabalan nsivabalan commented Jan 5, 2023

Change Logs

GCS might create some marker files for log files created by hudi. While constructing the file groups w/ log files, we should ignore such files. Format of those marker file is "GCS_SYNCABLE_TEMPFILE" + [LOG_FILE_NAME]. Eg: "GCS_SYNCABLE_TEMPFILE.files-0000_20230104082331173001.log.10_0-52-553.1.8170c3dc-f1f0-474f-aabf-b53a474aa18d".

We did make an attempt to fix before, but looks like the file pattern is different. So, have made the pattern match more strict.

This patch fixes the Log file pattern match to ensure we ignore such extraneous files.

Impact

Queries and compaction may not fail occationally.

Risk level (write none, low medium or high below)

low.

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

N/A

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@yihua yihua added the writer-core Issues relating to core transactions/write actions label Jan 12, 2023
@nsivabalan
Copy link
Contributor Author

nsivabalan commented Jan 18, 2023

Screen Shot 2023-01-18 at 3 50 16 PM

@@ -134,7 +134,7 @@ public void testFailedToGetAppendStreamFromHDFSNameNode()
// Opening a new Writer right now will throw IOException. The code should handle this, rollover the logfile and
// return a new writer with a bumped up logVersion
writer = HoodieLogFormat.newWriterBuilder().onParentPath(testPath)
.withFileExtension(HoodieArchivedLogFile.ARCHIVE_EXTENSION).withFileId("commits.archive")
.withFileExtension(HoodieArchivedLogFile.ARCHIVE_EXTENSION).withFileId("commits")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean the original tests do not properly construct the archived log file name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

@hudi-bot
Copy link

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@nsivabalan
Copy link
Contributor Author

Failed due to flaky flink IT test
Screen Shot 2023-01-19 at 3 57 41 PM

Copy link
Contributor

@yihua yihua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yihua yihua merged commit 86be855 into apache:master Jan 20, 2023
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Jan 31, 2023
nsivabalan added a commit to nsivabalan/hudi that referenced this pull request Mar 22, 2023
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:blocker writer-core Issues relating to core transactions/write actions
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants