[Enhancement] only read iceberg cache when mv refresh and inesert select stmt#68942
[Enhancement] only read iceberg cache when mv refresh and inesert select stmt#68942Wenjun7J wants to merge 1 commit intoStarRocks:mainfrom
Conversation
Signed-off-by: SevenJ <wenjun7j@gmail.com>
0253fc6 to
59a8e0e
Compare
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 6 / 6 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59a8e0e420
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (bypassCache) { | ||
| scanContext.setOnlyReadCache(true); | ||
| scanContext.setDataFileCache(null); | ||
| scanContext.setDeleteFileCache(null); | ||
| } else { |
There was a problem hiding this comment.
Keep caches attached when only-read mode is set
When onlyReadIcebergCache is true you currently set both caches to null, which makes StarRocksIcebergTableScan.useCache() return false because it checks dataFileCache != null. That means MV refresh / INSERT‑SELECT will bypass existing manifest caches entirely instead of reading from them, and will re-scan manifests every time even if they were already cached. If the intent is “read cache but don’t populate/refresh,” you should keep the caches attached and rely on onlyReadCache (which is already honored in planTaskWithCache) to skip puts; otherwise this change silently disables the cache in exactly the paths it was meant to use.
Useful? React with 👍 / 👎.
Why I'm doing:
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: