Skip to content
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

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

kaijchen
Copy link
Contributor

@kaijchen kaijchen commented Nov 7, 2023

Proposed changes

Some Status are ignored, we should handle them when possible.

DeltaWriterV2::open() always returns Status::OK(), it's meaningless to return Status.
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...

@kaijchen
Copy link
Contributor Author

kaijchen commented Nov 7, 2023

run buildall

dataroaring
dataroaring previously approved these changes Nov 7, 2023
Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

github-actions bot commented Nov 7, 2023

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Nov 7, 2023
Copy link
Contributor

github-actions bot commented Nov 7, 2023

PR approved by anyone and no changes requested.

Copy link
Contributor

@github-actions github-actions bot left a 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) {
Copy link
Contributor

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]

Suggested change
int64_t tablet_id, std::function<std::unique_ptr<DeltaWriterV2>()> creator) {
int64_t tablet_id, std::function<std::unique_ptr<DeltaWriterV2>( /*unused*/)> creator) {

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.83 seconds
stream load tsv: 556 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17162033146 Bytes

@kaijchen
Copy link
Contributor Author

kaijchen commented Nov 7, 2023

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Nov 7, 2023
Copy link
Contributor

@github-actions github-actions bot left a 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, {}); });
Copy link
Contributor

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, {}); });
Copy link
Contributor

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, {}); });
Copy link
Contributor

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, {}); });
                                      ^

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.03% (8394/22669)
Line Coverage: 29.44% (67940/230782)
Region Coverage: 28.12% (35152/124989)
Branch Coverage: 24.90% (17960/72120)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5360bc06a2474bc368a7d3a1f8230fbc7425df0c_5360bc06a2474bc368a7d3a1f8230fbc7425df0c/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.03 seconds
stream load tsv: 555 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.9 seconds inserted 10000000 Rows, about 346K ops/s
storage size: 17162207504 Bytes

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 8, 2023
Copy link
Contributor

github-actions bot commented Nov 8, 2023

PR approved by at least one committer and no changes requested.

@dataroaring dataroaring merged commit 519b486 into apache:master Nov 8, 2023
seawinde pushed a commit to seawinde/doris that referenced this pull request Nov 8, 2023
@kaijchen kaijchen deleted the sink-v2-status branch November 8, 2023 07:14
seawinde pushed a commit to seawinde/doris that referenced this pull request Nov 13, 2023
XuJianxu pushed a commit to XuJianxu/doris that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants