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-7581] Add a multi writer test with index updates and cleaning #12026

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

codope
Copy link
Member

@codope codope commented Sep 30, 2024

Change Logs

The main issue mentioned in the ticket is already fixed by https://github.com/apache/hudi/pull/11496/files#diff-bba4d3c385b771e0e3d64f12cdd07c89b1ad4d9bde44895a999db058c200b428. This PR adds a test to validate the scenario mentioned in the ticket, which is as follows:

  • Writer 1 is performing an index update for a specific commit instant, fetching the latest file slices and their corresponding log files.
  • Writer 2 is aggressively cleaning older file slices, including log files that Writer 1 might rely on for the index update.
  • If Writer 2 removes file slices or log files before Writer 1 finishes the index update, there is a potential for a FileNotFoundException, blocking Writer 1’s operation.

The issue is fixed in the linked patch as the file system view fetched in the getFileSystemView call is always fresh, instead of the one that was computed when HoodieBackedTableMetadataWriter was initialized, meaning Writer 1 should have an up-to-date view of the latest file slices and not face a FileNotFoundException.

Impact

Test a multi writer scenario with index update.

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

none

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

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

@github-actions github-actions bot added the size:M PR with lines of changes in (100, 300] label Sep 30, 2024
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.

Could you report the time taken of the new tests added, locally and in CI (see test time breakdown)?

@codope codope force-pushed the hudi-7581-multi-write-index branch from 14a6c5c to 0480cc7 Compare October 2, 2024 16:34
@codope
Copy link
Member Author

codope commented Oct 2, 2024

Could you report the time taken of the new tests added, locally and in CI (see test time breakdown)?

It takes about 10s locally. Similarly, in CI, it took 11.6s (59th in top 100 long-running test cases) - https://dev.azure.com/apachehudi/hudi-oss-ci/_build/results?buildId=836&view=logs&j=600e7de6-e133-5e69-e615-50ee129b3c08&t=51208f5c-c7eb-5cf4-055e-6966e7c28e33&l=59
Screenshot 2024-10-02 at 10 05 17 PM

@hudi-bot
Copy link

hudi-bot commented Oct 2, 2024

CI report:

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

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
Copy link
Contributor

yihua commented Oct 2, 2024

integration-tests failure is irrelevant. Merging this PR.

@yihua yihua merged commit 205861e into apache:master Oct 2, 2024
42 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M PR with lines of changes in (100, 300]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants