-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] fix compatibility issue when collecting query statistics #29678
[BugFix] fix compatibility issue when collecting query statistics #29678
Conversation
02bbbe5
to
6c8647e
Compare
Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
6c8647e
to
4beefca
Compare
Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
0b256db
SonarCloud Quality Gate failed.
|
[FE Incremental Coverage Report]😍 pass : 2 / 2 (100.00%) file detail
|
[BE Incremental Coverage Report]😍 pass : 11 / 13 (84.62%) file detail
|
@Mergifyio backport branch-2.4 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
…9678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com> (cherry picked from commit be2f71b) # Conflicts: # be/src/exec/pipeline/stream_pipeline_driver.cpp # be/src/runtime/runtime_state.h # fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java # gensrc/thrift/InternalService.thrift
…9678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com> (cherry picked from commit be2f71b) # Conflicts: # be/src/exec/pipeline/pipeline_driver.cpp # be/src/exec/pipeline/stream_pipeline_driver.cpp # be/src/runtime/runtime_state.h # fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java # gensrc/thrift/InternalService.thrift
…arRocks#29678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
…arRocks#29678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
…arRocks#29678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
…arRocks#29678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
…arRocks#29678) Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
this compatibility issue was introduce by #27779
Before #27779, pipeline engine didn't maintain scan statistics for each table,
QueryStatistics::_stats_items
was always empty, so _stats_items needn't be merged inQueryStatistics::merge
.But after that,
QueryStatistics::_stats_items
is no longer empty. In the implementation of older version,QueryStatistics::_stats_items
is a vector and the problem of deduplication is not considered, which may occupy a lot of memory inQueryStatistics::merge
. If a cluster is in the process of grayscale upgrade, the memory usage of the old version BE may increase.A new session variable
enable_collect_table_level_scan_stats
is introduced here to control whether to collect table level scan stats, which is false by default, so that the behavior of query stats will remain the same as before during the grayscale upgrade. After all nodes are upgraded, we can setenable_collect_table_level_scan_stats
back to true to make fe scan metrics work normally.What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: