-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[fix](move-memtable) handle status when possible #26526
Conversation
run buildall |
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. |
PR approved by anyone and no changes requested. |
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
DeltaWriterV2* DeltaWriterV2Map::get_or_create(int64_t tablet_id, | ||
std::function<DeltaWriterV2*()> creator) { | ||
DeltaWriterV2* DeltaWriterV2Map::get_or_create( | ||
int64_t tablet_id, std::function<std::unique_ptr<DeltaWriterV2>()> creator) { |
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: all parameters should be named in a function [readability-named-parameter]
int64_t tablet_id, std::function<std::unique_ptr<DeltaWriterV2>()> creator) { | |
int64_t tablet_id, std::function<std::unique_ptr<DeltaWriterV2>( /*unused*/)> creator) { |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
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
static_cast<void>(DeltaWriterV2::open(&req, {}, &writer)); | ||
return writer; | ||
}); | ||
auto writer = map->get_or_create(100, [&req]() { return DeltaWriterV2::open(&req, {}); }); |
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: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
auto writer = map->get_or_create(100, [&req]() { return DeltaWriterV2::open(&req, {}); });
^
return writer; | ||
}); | ||
auto writer = map->get_or_create(100, [&req]() { return DeltaWriterV2::open(&req, {}); }); | ||
auto writer2 = map->get_or_create(101, [&req]() { return DeltaWriterV2::open(&req, {}); }); |
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: 101 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
auto writer2 = map->get_or_create(101, [&req]() { return DeltaWriterV2::open(&req, {}); });
^
}); | ||
auto writer = map->get_or_create(100, [&req]() { return DeltaWriterV2::open(&req, {}); }); | ||
auto writer2 = map->get_or_create(101, [&req]() { return DeltaWriterV2::open(&req, {}); }); | ||
auto writer3 = map->get_or_create(100, [&req]() { return DeltaWriterV2::open(&req, {}); }); |
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: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
auto writer3 = map->get_or_create(100, [&req]() { return DeltaWriterV2::open(&req, {}); });
^
TeamCity be ut coverage result: |
(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. |
Proposed changes
Some
Status
are ignored, we should handle them when possible.DeltaWriterV2::open()
always returnsStatus::OK()
, it's meaningless to returnStatus
.Change it to return the result pointer directly.
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...