Gabriel39 opened a new pull request, #65449:
URL: https://github.com/apache/doris/pull/65449
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
FileScannerV2 already routes supported remote reads through FileCache and
attaches a FileCacheStatistics instance to its IOContext. However, unlike
FileScanner V1, it never invokes FileCacheProfileReporter when the scanner
finishes. As a result, V2 query profiles omit the FileCache counter subtree
even when cache I/O occurs, and bytes written into cache are not included in
the query resource context.
This change reports the accumulated FileCacheStatistics through the shared
reporter during FileScannerV2 profile collection, updates query-level
cache-write bytes, and adds coverage for local, remote, peer, cache-write, and
peer-node profile values.
### Release note
FileScannerV2 query profiles now expose the FileCache counter subtree when
file cache is enabled.
### Check List (For Author)
- Test
- [ ] Regression test
- [ ] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- `PATH=/usr/local/opt/llvm@16/bin:/usr/local/bin:/usr/bin:/bin
build-support/check-format.sh`
- `/usr/local/opt/llvm@16/bin/clang-format --dry-run --Werror
be/src/exec/scan/file_scanner_v2.cpp be/src/exec/scan/file_scanner_v2.h
be/test/exec/scan/file_scanner_v2_test.cpp`
- `git diff --check`
- Targeted BE UT command: `./run-be-ut.sh --run
--filter='FileScannerV2Test.*:FileCacheProfileReporterTest.*'`. It was
attempted but CMake configuration is blocked locally because the thirdparty
Protobuf library is missing.
- [ ] No need to test or manual test. Explain why:
- Behavior changed:
- [ ] No.
- [x] Yes. FileScannerV2 now publishes FileCache query-profile counters
and accounts for bytes written into cache in the query resource context.
- Does this need documentation?
- [ ] No.
- [x] Yes. The existing internal profile reference is updated in place:
https://selectdb.feishu.cn/docx/E0ledc15JogWePx45zOcqvZnncg
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]