matanper opened a new issue, #68896:
URL: https://github.com/apache/doris/issues/68896

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   ### Version
   
   4.1.4; master is the same.
   
   ### What's Wrong?
   
   When an auto-analyze job fails, the table's last-analyzed time is not 
updated, so the next scheduling cycle starts the same job again. In 
`AnalysisManager`, when a job reaches a terminal state with a failure, it calls 
`job.markFailed()` and clears `partitionUpdateRows` but skips 
`updateTableStats(job)`. Only the success branch calls `updateTableStats` → 
`TableStatsMeta.update(...)`, which records the time that 
`huge_table_auto_analyze_interval_in_millis` checks.
   
   As a result, on a huge table where analyze keeps failing (e.g. its scans 
time out under heavy load), the interval never applies. A new job starts 
roughly every scheduling cycle (about every minute in our case), each issuing 
its full set of scans. Raising `huge_table_auto_analyze_interval_in_millis` (we 
tried 12 h) has no effect. The only working mitigation we found was restricting 
auto analyze to an off-peak window (`auto_analyze_start_time` / 
`auto_analyze_end_time`).
   
   ### What You Expected?
   
   A failed job should count as an attempt for scheduling: record the attempt 
time, or back off failed tables, so huge tables follow 
`huge_table_auto_analyze_interval_in_millis` even when analyze fails.
   
   ### How to Reproduce?
   
   On a huge table, make analyze fail (e.g. lower the analyze query timeout 
below the time a full scan takes) and watch auto-analyze job history: new jobs 
for the same table start every cycle regardless of 
`huge_table_auto_analyze_interval_in_millis`.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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