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

[Enhancement] Try refresh Iceberg table on file not found #49551

Closed
wants to merge 1 commit into from

Conversation

Samrose-Ahmed
Copy link
Contributor

@Samrose-Ahmed Samrose-Ahmed commented Aug 7, 2024

Why I'm doing:

Currently, if in Iceberg a compaction/deletion happens and file is physically deleted from S3, if the Iceberg metadata is cached, it can result in repeated query failure with Remote file not found.

What I'm doing:

Make sure RemoteFileNotFound exception is propagated to FE and refresh Iceberg metadata on encountering. Also try to replan and retry.

Fixes #issue

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.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

Documentation PRs only:

If you are submitting a PR that adds or changes English documentation and have not
included Chinese documentation, then you can check the box to request GPT to translate the
English doc to Chinese. Please ensure to uncheck the Do not translate box if translation is needed.
The workflow will generate a new PR with the Chinese translation after this PR is merged.

  • Yes, translate English markdown files with GPT
  • Do not translate

@github-actions github-actions bot added the 3.3 label Aug 7, 2024
Copy link

sonarcloud bot commented Aug 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link

github-actions bot commented Aug 8, 2024

[FE Incremental Coverage Report]

fail : 1 / 20 (05.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/planner/IcebergScanNode.java 0 1 00.00% [348]
🔵 com/starrocks/qe/ExecuteExceptionHandler.java 1 19 05.26% [85, 86, 87, 88, 89, 90, 92, 94, 97, 98, 100, 101, 102, 103, 104, 105, 108, 109]

Copy link

github-actions bot commented Aug 8, 2024

[BE Incremental Coverage Report]

fail : 3 / 4 (75.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/formats/parquet/file_reader.cpp 1 2 50.00% [748]
🔵 be/src/io/s3_input_stream.cpp 2 2 100.00% []

@kevincai
Copy link
Contributor

@before-Sunrise @Smith-Cruise please take a look at this PR at your convenience.

@kevincai
Copy link
Contributor

@Samrose-Ahmed The code coverage on FE side doesn't look good. Please take a look and check if more cases or sql-tester can be added to increase the coverage.

@Smith-Cruise
Copy link
Contributor

@stephen-shelby PTAL

@stephen-shelby
Copy link
Contributor

hi, thanks for your contribution. Iceberg refresh costs far more than hive. hive table only need to refresh cached partition or files. but iceberg catalog need to refresh all table files if you don't pass predicate. we provide a background refresh every 10mins. If you have strict requirements for timeliness and accuracy. you could disable iceberg metadata cache in the catalog properties. the property key is "enable_iceberg_metadata_cache".

@Samrose-Ahmed
Copy link
Contributor Author

Samrose-Ahmed commented Aug 26, 2024

That's kinda fine, I solved this for us in a different way by not physically deleting quickly so its not critical. You can close this.

@kevincai kevincai closed this Aug 26, 2024
@stephen-shelby
Copy link
Contributor

That's kinda fine, I solved this for us in a different way by not physically deleting quickly so its not critical. You can close this.

so, how did you solve this issue?

@Samrose-Ahmed
Copy link
Contributor Author

We just adjust don't delete so aggressively, it's ok for us to have some stale result.

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.

4 participants