-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Refactor](query) refactor lock in fragment mgr and change std::unorder_map to phmap #44821 #45232
[Refactor](query) refactor lock in fragment mgr and change std::unorder_map to phmap #44821 #45232
Conversation
run buildall |
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Status FragmentMgr::_get_query_ctx(const Params& params, TUniqueId query_id, bool pipeline, | ||
QuerySource query_source, | ||
std::shared_ptr<QueryContext>& query_ctx) { | ||
Status FragmentMgr::_get_or_create_query_ctx(const TPipelineFragmentParams& params, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function '_get_or_create_query_ctx' has cognitive complexity of 69 (threshold 50) [readability-function-cognitive-complexity]
Status FragmentMgr::_get_or_create_query_ctx(const TPipelineFragmentParams& params,
^
Additional context
be/src/runtime/fragment_mgr.cpp:666: +1, including nesting penalty of 0, nesting level increased to 1
DBUG_EXECUTE_IF("FragmentMgr._get_query_ctx.failed", {
^
be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/runtime/fragment_mgr.cpp:666: +2, including nesting penalty of 1, nesting level increased to 2
DBUG_EXECUTE_IF("FragmentMgr._get_query_ctx.failed", {
^
be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^
be/src/runtime/fragment_mgr.cpp:674: +1, including nesting penalty of 0, nesting level increased to 1
if (params.is_simplified_param) {
^
be/src/runtime/fragment_mgr.cpp:676: +2, including nesting penalty of 1, nesting level increased to 2
if (!query_ctx) {
^
be/src/runtime/fragment_mgr.cpp:682: +1, nesting level increased to 1
} else {
^
be/src/runtime/fragment_mgr.cpp:683: +2, including nesting penalty of 1, nesting level increased to 2
if (!query_ctx) {
^
be/src/runtime/fragment_mgr.cpp:687: +3, including nesting penalty of 2, nesting level increased to 3
if (search != _query_ctx_map.end()) {
^
be/src/runtime/fragment_mgr.cpp:691: +3, including nesting penalty of 2, nesting level increased to 3
if (!query_ctx) {
^
be/src/runtime/fragment_mgr.cpp:705: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(DescriptorTbl::create(&(query_ctx->obj_pool), params.desc_tbl,
^
be/src/common/status.h:632: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/runtime/fragment_mgr.cpp:705: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(DescriptorTbl::create(&(query_ctx->obj_pool), params.desc_tbl,
^
be/src/common/status.h:634: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/runtime/fragment_mgr.cpp:708: +4, including nesting penalty of 3, nesting level increased to 4
if (params.__isset.file_scan_params) {
^
be/src/runtime/fragment_mgr.cpp:714: +4, including nesting penalty of 3, nesting level increased to 4
if (params.__isset.resource_info) {
^
be/src/runtime/fragment_mgr.cpp:722: +4, including nesting penalty of 3, nesting level increased to 4
if (params.__isset.workload_groups && !params.workload_groups.empty()) {
^
be/src/runtime/fragment_mgr.cpp:722: +1
if (params.__isset.workload_groups && !params.workload_groups.empty()) {
^
be/src/runtime/fragment_mgr.cpp:726: +5, including nesting penalty of 4, nesting level increased to 5
if (workload_group_ptr != nullptr) {
^
be/src/runtime/fragment_mgr.cpp:727: +6, including nesting penalty of 5, nesting level increased to 6
RETURN_IF_ERROR(workload_group_ptr->add_query(query_id, query_ctx));
^
be/src/common/status.h:632: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/runtime/fragment_mgr.cpp:727: +7, including nesting penalty of 6, nesting level increased to 7
RETURN_IF_ERROR(workload_group_ptr->add_query(query_id, query_ctx));
^
be/src/common/status.h:634: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/runtime/fragment_mgr.cpp:728: +6, including nesting penalty of 5, nesting level increased to 6
RETURN_IF_ERROR(query_ctx->set_workload_group(workload_group_ptr));
^
be/src/common/status.h:632: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/runtime/fragment_mgr.cpp:728: +7, including nesting penalty of 6, nesting level increased to 7
RETURN_IF_ERROR(query_ctx->set_workload_group(workload_group_ptr));
^
be/src/common/status.h:634: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/runtime/fragment_mgr.cpp:731: +1, nesting level increased to 5
} else {
^
cherry pick from #44821