wenzhenghu opened a new pull request, #65104:
URL: https://github.com/apache/doris/pull/65104
### What problem does this PR solve?
Issue Number: N/A
Related PR: #53729
Problem Summary:
The fallback branch in `FileScanner::update_realtime_counters()` previously
treated all reads without file cache accounting as remote reads. This made
`scan_bytes_from_remote_storage` inaccurate for `FILE_LOCAL` queries such as
`local()` TVF scans, and also caused the local/remote accounting exported
through `IOContext` and `DorisMetrics` to diverge.
This PR fixes the fallback accounting by routing `FILE_LOCAL` reads to local
storage metrics while keeping non-local fallback reads on remote storage
metrics. It also adds an audit-based regression test that verifies `local()`
scan bytes are recorded in `scan_bytes_from_local_storage` and not in
`scan_bytes_from_remote_storage`.
### Release note
Fix incorrect remote scan byte accounting for local TVF reads.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Manual test (add detailed scripts or steps below)
- [x] Run `./run-regression-test.sh --run -d audit -s
test_local_tvf_scan_bytes_metrics` against the fixed 9036 instance
- [x] Verify `local()` reads are counted in local scan bytes instead
of remote scan bytes
- [ ] Unit Test
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
- Behavior changed:
- [ ] No.
- [x] Yes. Local TVF fallback reads are now reported as local scan bytes
instead of remote scan bytes.
- Does this need documentation?
- [x] No.
- [ ] Yes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]