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

[BugFix] Do not cache metadata json files in IcebergCachingFileIO #54915

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Youngwb
Copy link
Contributor

@Youngwb Youngwb commented Jan 10, 2025

Why I'm doing:

Fixes #54786

What I'm doing:

Do not cache metadata json files because the name could be same, like "v1.metadata.json" when re-create table with same name.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@Youngwb Youngwb requested a review from a team as a code owner January 10, 2025 04:48
@DorianZheng
Copy link
Contributor

I'm afraid about the cold query performance if we don't cache it. What do you think?

@zombee0
Copy link
Contributor

zombee0 commented Jan 10, 2025

I'm afraid about the cold query performance if we don't cache it. What do you think?

+1

@jason-heo
Copy link

Hello.

I'm the author of #54786

I’m new to StarRocks and have a quick question.

Does REFRESH EXTERNAL TABLE invalidate the metadata cache?

If not, could you please let me know which caches are flushed after running REFRESH EXTERNAL TABLE?

@Youngwb Youngwb force-pushed the fix_iceberg_hadoop branch from fd6f991 to 8658a9f Compare January 10, 2025 12:04
@Youngwb
Copy link
Contributor Author

Youngwb commented Jan 10, 2025

@DorianZheng @zombee0 This PR do not cache the metadata json file for iceberg hadoop catalog, It does not affect the performance of hive/glue catalog

@Youngwb
Copy link
Contributor Author

Youngwb commented Jan 10, 2025

Hello.

I'm the author of #54786

I’m new to StarRocks and have a quick question.

Does REFRESH EXTERNAL TABLE invalidate the metadata cache?

If not, could you please let me know which caches are flushed after running REFRESH EXTERNAL TABLE?

REFRESH EXTERNAL TABLE do not invalidate the metadata file cache, It only invalidate iceberg table snapshot cache, and reload the latest snapshot from metadata file, but metadata file is cached in icebergCachingFileIO(It should not be cached), so the REFRESH EXTERNAL TABLE does not work here

@jason-heo
Copy link

@Youngwb

Thank you for your detailed answer :)

It would be nice if your explanation is described on the documentation

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 5 / 5 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/connector/iceberg/io/IcebergCachingFileIO.java 5 5 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iceberg metadata is not refreshed after DROP & CREATE again
4 participants