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-8769] Limit instantsToArchive to avoid expensive locks blocking ingestion and table services #12491

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vinishjail97
Copy link
Contributor

@vinishjail97 vinishjail97 commented Dec 15, 2024

Change Logs

Archival takes a lock before archiving instants when a large timeline with tens of thousands instants is pruned to few hundreds this blocks other table services from completion because they can't acquire the lock.

Impact

Avoids blocking ingestion and other table services for archiving large timelines.

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

Low

Documentation Update

  public static final ConfigProperty<Long> ARCHIVE_LIMIT_INSTANTS = ConfigProperty
      .key("hoodie.archive.limit.instants")
      .defaultValue(Long.MAX_VALUE)
      .markAdvanced()
      .sinceVersion("0.16.0")
      .withDocumentation("If enabled, archival will limit the instants upto this value."
          + "This is useful when a large timeline containing tens of thousands instants that need to archived");

Contributor's checklist

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

@vinishjail97
Copy link
Contributor Author

Where do I add tests for v1 archival ? They seem to have been deleted in 1.0 and moved to a new location.

Copy link
Contributor

@nsivabalan nsivabalan left a comment

Choose a reason for hiding this comment

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

this might contradict with "hoodie.keep.min.commits". So, the question we might need to ask ourselves is, why not adjusting "hoodie.keep.min.commits" and "hoodie.keep.max.commits" help here?

@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Dec 16, 2024
Copy link
Contributor

@nsivabalan nsivabalan left a comment

Choose a reason for hiding this comment

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

can we add tests please

@danny0405
Copy link
Contributor

danny0405 commented Dec 17, 2024

this might contradict with "hoodie.keep.min.commits". So, the question we might need to ask ourselves is, why not adjusting "hoodie.keep.min.commits" and "hoodie.keep.max.commits" help here?

I'm wondering why there are so many active instants on the timeline, the ingestion still not perform well if there are too many small files within the timeline. And listing cost should be huge.

@vinishjail97
Copy link
Contributor Author

this might contradict with "hoodie.keep.min.commits". So, the question we might need to ask ourselves is, why not adjusting "hoodie.keep.min.commits" and "hoodie.keep.max.commits" help here?

I'm wondering why there are so many active instants on the timeline, the ingestion still not perform well if there are too many small files within the timeline. And listing cost should be huge.

The table can be in a bad state and user enabled table services with the right configs.

@github-actions github-actions bot added size:M PR with lines of changes in (100, 300] and removed size:S PR with lines of changes in (10, 100] labels Dec 17, 2024
@hudi-bot
Copy link

CI report:

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

@danny0405
Copy link
Contributor

this might contradict with "hoodie.keep.min.commits". So, the question we might need to ask ourselves is, why not adjusting "hoodie.keep.min.commits" and "hoodie.keep.max.commits" help here?

I'm wondering why there are so many active instants on the timeline, the ingestion still not perform well if there are too many small files within the timeline. And listing cost should be huge.

The table can be in a bad state and user enabled table services with the right configs.

Maybe a better solution is just archive the instants in one shot from the HUDI CLI cmd.

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.

4 participants