You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "HappenLee (via GitHub)" <gi...@apache.org> on 2026/10/13 19:55:36 UTC
[PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
HappenLee opened a new pull request, #69042:
URL: https://github.com/apache/doris/pull/69042
### What problem does this PR solve?
Related PR: #68312
`agg_state_finalize_roll_up` can fail its chosen-MV assertion even when rewriting succeeds. In [CloudP0 build 1066869](http://43.132.222.7:8111/buildConfiguration/Doris_DorisRegression_CloudP0/1066869), both the 700-row base table and `finalize_sum_mv` were estimated at one row, and EXPLAIN reported `finalize_sum_mv not chose`.
Synchronous ANALYZE does not wait for tablet row-count reporting. The existing data amplification therefore does not guarantee a cost advantage for the MV when those reports are stale. Pin the actual fixture cardinalities using the existing `ALTER COLUMN SET STATS` mechanism: 700 base rows, five rows in each successful `(k, g)` MV, and three distinct `k` values. This supplies stable statistics to both the base-table and MV scan paths.
Keep the strict chosen-MV assertions for both finalizer queries and the existing MERGE/UNION rollup, the MAX/ABS rejection checks, all inserted data, and the expected result file unchanged. No production optimizer or aggregation code changes.
### Release note
None
### Check List (For Author)
- Test:
- [x] Regression test: five consecutive ordinary comparison runs of `agg_state_finalize_roll_up` passed on a dedicated local ASAN cluster, with tablet row-count refresh/report intervals set to 600 seconds. Used the same CI binary package as the reported failure (`doris-0.0.0-a1f5d53acf`), which includes #68312. The test source matches current master; no expected-output generation or edits were needed.
- [x] Controlled reproduction: temporarily setting the pre-fix base-table estimate to one row reproduced the same `finalize_sum_mv not chose` assertion failure. The temporary reproduction change is not included in this PR.
- [x] Regression framework build: 41 framework tests passed. `git diff --check` passed.
- Full CloudP0 has not been rerun locally; local validation used shared-nothing mode to exercise the same statistics-sensitive MV-selection assertion.
- Behavior changed:
- [x] No. Regression fixture statistics only.
- [ ] Yes.
- 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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg merged PR #69042:
URL: https://github.com/apache/doris/pull/69042
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6159127407
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6209403822
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6153966936
/review
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6262205571
PR approved by anyone and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #69042:
URL: https://github.com/apache/doris/pull/69042#discussion_r4263581335
##########
regression-test/suites/nereids_rules_p0/mv/agg_with_roll_up/agg_state_finalize_roll_up.groovy:
##########
@@ -39,6 +39,12 @@ suite("agg_state_finalize_roll_up") {
select k, g, v from agg_finalize_rollup_input cross join numbers("number"="99")
"""
sql "analyze table agg_finalize_rollup_input with sync"
+ // Synchronous ANALYZE does not wait for tablet row-count reports. Pin the fixture
+ // cardinalities so CBO chooses the rollup independently of report timing.
+ sql """
+ alter table agg_finalize_rollup_input modify column k
+ set stats ('row_count'='700', 'ndv'='3')
Review Comment:
[P2] Protect the statistics pins from queued automatic cleanup
A default CloudP0 automatic-analysis job can already be queued for this table before this pin. If CloudTabletStatMgr's tablet snapshot misses the newly created table, its later fresh-table summary can mark the replicas' default zero row count as reported. StatisticsAutoCollector.readyToSample processes that pending job before the userInjected filter and deletes the nonempty table/column statistics, including this 700-row pin. If cleanup runs after finalize_sum_mv builds its statistics cache but before these assertions, the base scan falls back to one row while the MV retains its cached 3.375-row estimate (or pinned five-row fallback), allowing CBO to prefer the base and fail the strict chosen-MV checks again. The fixture needs to exclude queued background cleanup, or ensure the collector honors injected statistics before its empty-table cleanup, before relying on these pins.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6262206224
PR approved by at least one committer and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6153962811
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://doris.apache.org/community/how-to-contribute/review-and-ci).
Please clearly describe your PR:
1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
3. What features were added. Why was this function added?
4. Which code was refactored and why was this part of the code refactored?
5. Which functions were optimized and what is the difference before and after the optimization?
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [test](regression) Stabilize aggregate state finalize MV rollup checks [doris]
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on PR #69042:
URL: https://github.com/apache/doris/pull/69042#issuecomment-6211511864
/review
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org