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

   ### What problem does this PR solve?
   
   Issue Number: close #69281
   
   `TableStatsMeta.update` paired two values snapshotted at different moments: 
`indexesRowCount` (collected by `COUNT(1)` when the task runs) and 
`updatedRowsBase` (`jobInfo.updateRows`, captured when the analyze job was 
built). Loads that became visible in between are counted twice by the fallback 
estimate `getBaseIndexDeltaRowCount`.
   
   This refreshes `jobInfo.updateRows` from the stats record right after the 
row count is collected in `BaseAnalysisTask.runQuery`, so the baseline and the 
count describe the same snapshot. A regression test in `TableStatsMetaTest` 
covers both the fixed case (delta 0) and the old behavior (delta 50 
double-count).
   
   ### Release note
   
   None
   
   ### Check List (For Contributor)
   
   - Behavior change: yes, the fallback row-count delta no longer double-counts 
loads that happened between job build and count collection.
   - Added tests: yes (`testBaseIndexDeltaRowCountUsesCollectedBaseline`)
   - `./run-be-ut.sh` / `fe`: `mvn -pl fe-core test -Dtest=TableStatsMetaTest` 
passes (3/3)
   - Committed code passes Checkstyle: yes (no new imports beyond existing 
style)


-- 
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