mrhhsg opened a new pull request, #70981:
URL: https://github.com/apache/doris/pull/70981

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #70836
   
   Backport of #70836 (source commit f83708623ac141d6ba21d0f9372bbe63ec04723f) 
to `branch-4.2`.
   
   Problem Summary:
   
   OLAP scanners construct a full FileCache profile reporter on every batch, 
repeatedly looking up shared profile counters. This change keeps byte 
accounting realtime while moving detailed FileCache reporting out of the 
per-batch path.
   
   - Register and cache the three level-1 FileCache byte counters in 
`OlapScanLocalState`.
   - Publish per-scanner byte deltas to the profile, IOContext and metrics, 
preserving the compressed-byte fallback for page-cache-only batches.
   - Retain the reader's cumulative FileCache statistics and publish details at 
scanner termination. Subtract already reported bytes from a copy to avoid 
double counting and leave reader totals intact.
   - Preserve branch-4.2's existing scanner termination context without adding 
read-ahead interfaces. Initialize the unit-test fixture's nullable tuple flags 
for the target branch's RowDescriptor contract.
   
   The existing fragment-profile snapshot lifecycle is unchanged.
   
   ### Release note
   
   Reduce per-batch FileCache profile bookkeeping in OLAP scans while retaining 
realtime byte accounting.
   
   ### Check List (For Author)
   
   - Test:
       - [x] Unit Test
       - [x] Regression test
   
   Local validation completed:
   
   ```bash
   timeout 5400 bash build.sh --be -j 48
   
   timeout 1800 bash run-be-ut.sh -j 48 --run \
     
--filter='OlapFileCacheProfileTest.*:OlapFileCacheFinalProfileTest.*:DorisMetricsTest.*:OlapScannerTest.*:ScanOperatorTest.*:ScannerLateArrivalRfTest.*:ScannerProjectionTest.*'
   
   timeout 1800 env GTEST_SHUFFLE=1 GTEST_RANDOM_SEED=42 GTEST_REPEAT=20 \
     bash run-be-ut.sh -j 48 --run \
     --filter='OlapFileCacheProfileTest.*:OlapFileCacheFinalProfileTest.*'
   
   ./run-regression-test.sh --conf "$REGRESSION_CONF" --run \
     -d query_p0/limit -s test_unified_limit_pushdown
   ```
   
   - BE Release build passed.
   - Focused ASAN tests: 17 passed.
   - Seven FileCache accounting/lifetime tests: 20 shuffled iterations, 140 
executions passed.
   - LIMIT regression: one suite passed, zero failed/fatal/skipped. 
`$REGRESSION_CONF` denotes the isolated local regression configuration.
   - clang-format 16 dry-run and `git diff --check` passed for the complete 
backport.
   
   The SQL regression used non-cloud local OLAP with Java support disabled. 
Real cloud FileCache I/O, JNI/HDFS, FE final-profile transport, mixed-version 
execution and performance benchmarks were not exercised.
   
   - Behavior changed:
       - [x] Yes. Detailed FileCache counters are collected at scanner 
termination; the three byte counters remain realtime. SQL results are unchanged.
   
   - Does this need documentation?
       - [x] No.
   
   ### 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]

Reply via email to