starrocks
starrocks copied to clipboard
[BugFix] Followers could not update statistics immediately after the statistics rebuild
What type of PR is this:
- [x] bug
- [ ] feature
- [ ] enhancement
- [ ] refactor
- [ ] others
Which issues of this PR fixes :
Fixes #9840
Problem Summary(Required) :
specific reproduction conditions
- Run the analyze statement on the follower, the command will be forwarded to the master
- Collect statistical information on the master, and delete the local cache after the master collects successfully
- The follower runs the query statement of the related table, because the local cache is not cleared, continue to use the local cache
Checklist:
- [x] I have added test cases for my bug fix or my new feature
- [x] I have added user document for my new feature or new function
run starrocks_be_build
run starrocks_be_build
run starrocks_fe_unittest
Could you plz explain why we could not update statistics immediately after the statistics rebuild?
Could you plz explain why we could not update statistics immediately after the statistics rebuild?
specific reproduction conditions
- Run the analyze statement on the follower, the command will be forwarded to the master
- Collect statistical information on the master, and delete the local cache after the master collects successfully
- The follower runs the query statement of the related table, because the local cache is not cleared, continue to use the local cache
run starrocks_fe_unittest
run starrocks_fe_unittest
run starrocks_fe_unittest
[FE PR Coverage Check]
:disappointed: fail : 14 / 45 (31.11%)
file detail
path | covered_line | new_line | coverage | not_covered_line_detail | |
---|---|---|---|---|---|
:large_blue_circle: | com/starrocks/statistic/StatisticExecutor.java | 0 | 1 | 00.00% | [287] |
:large_blue_circle: | com/starrocks/statistic/StatisticsMetaManager.java | 0 | 1 | 00.00% | [212] |
:large_blue_circle: | com/starrocks/persist/EditLog.java | 0 | 2 | 00.00% | [803, 816] |
:large_blue_circle: | com/starrocks/sql/optimizer/statistics/CachedStatisticStorage.java | 0 | 3 | 00.00% | [116, 117, 166] |
:large_blue_circle: | com/starrocks/statistic/AnalyzeManager.java | 0 | 23 | 00.00% | [143, 144, 145, 147, 148, 149, 151, 152, 174, 175, 176, 178, 179, 180, 182, 183, 184, 300, 301, 302, 303, 304, 305] |
:large_blue_circle: | com/starrocks/sql/ast/ShowBasicStatsMetaStmt.java | 9 | 10 | 90.00% | [55] |
:large_blue_circle: | com/starrocks/statistic/BasicStatsMeta.java | 2 | 2 | 100.00% | [] |
:large_blue_circle: | com/starrocks/sql/ast/ShowAnalyzeStatusStmt.java | 1 | 1 | 100.00% | [] |
:large_blue_circle: | com/starrocks/statistic/StatisticsCollectJobFactory.java | 1 | 1 | 100.00% | [] |
:large_blue_circle: | com/starrocks/load/OlapDeleteJob.java | 1 | 1 | 100.00% | [] |
run starrocks_admit_test