-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[optimize](cooldown)Reduce the number of calls to the pick_cooldown_rowset #27091
Conversation
run buildall |
49bfbe1
to
b725440
Compare
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.
LGTM
PR approved by anyone and no changes requested. |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
b725440
to
e630c06
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
e630c06
to
02ed13f
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
run COMPILE |
run COMPILE (DORIS_COMPILE) |
run compile(doris_compile) |
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
task.work_function = [tablet, task_size = tablets.size(), this]() { | ||
Status st = tablet->cooldown(); | ||
RowsetSharedPtr rowset = rowsets[index++]; | ||
task.work_function = [tablet, rowset, task_size = tablets.size(), this]() { |
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.
It seems we could use std::move
to decrease two shared ptr copy
be/src/olap/tablet.cpp
Outdated
@@ -2057,7 +2057,7 @@ Status Tablet::cooldown() { | |||
|
|||
if (_cooldown_replica_id == replica_id()) { | |||
// this replica is cooldown replica | |||
RETURN_IF_ERROR(_cooldown_data()); | |||
RETURN_IF_ERROR(_cooldown_data(rowset)); |
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.
RETURN_IF_ERROR(_cooldown_data(rowset)); | |
RETURN_IF_ERROR(_cooldown_data(std::move(rowset))); | |
```suggestion | |
RETURN_IF_ERROR(_cooldown_data(rowset)); |
be/src/olap/tablet.cpp
Outdated
RowsetSharedPtr old_rowset = NULL; | ||
|
||
if (rowset) { | ||
RowsetId rowset_id = rowset->rowset_id(); |
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.
Could we use const auto& ?
02ed13f
to
b02454f
Compare
clang-tidy review says "All clean, LGTM! 👍" |
b02454f
to
517aa4a
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity be ut coverage result: |
be/src/olap/tablet.cpp
Outdated
int64_t id = storage_policy_id(); | ||
if (id <= 0) { | ||
VLOG_DEBUG << "tablet does not need cooldown, tablet id: " << tablet_id(); | ||
return false; | ||
return NULL; |
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.
using nullptr
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.
ok
517aa4a
to
42ed4c5
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
TeamCity be ut coverage result: |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
LGTM |
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
TeamCity be ut coverage result: |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
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.
LGTM
PR approved by at least one committer and no changes requested. |
…owset (apache#27091) Co-authored-by: xingying01 <xingying01@corp.netease.com>
…owset (apache#27091) Co-authored-by: xingying01 <xingying01@corp.netease.com>
…owset
Proposed changes
Issue Number: close #27055
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...