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](status)Fix leaky abstraction and shield the status code END_OF_FILE from upper layers #24165

Merged
merged 5 commits into from
Sep 12, 2023

Conversation

bobhan1
Copy link
Contributor

@bobhan1 bobhan1 commented Sep 11, 2023

Proposed changes

In #23855 and #24139, the low level status code END_OF_FILE is leaked to upper layers and causes some problems. This PR shields the status code END_OF_FILE from upper layers and transforms it to the status code with appropriate semantics.

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...

@bobhan1
Copy link
Contributor Author

bobhan1 commented Sep 11, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.92% (7917/21441)
Line Coverage: 28.95% (63612/219695)
Region Coverage: 27.88% (32997/118345)
Branch Coverage: 24.46% (16945/69276)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0e73444c52f5166079ae2e6314d408ff62790502_0e73444c52f5166079ae2e6314d408ff62790502/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 49.08 seconds
stream load tsv: 582 seconds loaded 74807831229 Bytes, about 122 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 30 seconds loaded 861443392 Bytes, about 27 MB/s
insert into select: 29.2 seconds inserted 10000000 Rows, about 342K ops/s
storage size: 17162198511 Bytes

@bobhan1
Copy link
Contributor Author

bobhan1 commented Sep 11, 2023

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.93% (7919/21441)
Line Coverage: 28.96% (63629/219698)
Region Coverage: 27.90% (33014/118347)
Branch Coverage: 24.47% (16950/69278)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0e73444c52f5166079ae2e6314d408ff62790502_0e73444c52f5166079ae2e6314d408ff62790502/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.18 seconds
stream load tsv: 581 seconds loaded 74807831229 Bytes, about 122 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162112939 Bytes

@bobhan1 bobhan1 changed the title [Fix](status)FIx status [Fix](status)Shield the status code END_OF_FILE from upper layers Sep 11, 2023
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@bobhan1 bobhan1 changed the title [Fix](status)Shield the status code END_OF_FILE from upper layers [Fix](status)Fix leaky abstraction and shield the status code END_OF_FILE from upper layers Sep 11, 2023
@bobhan1
Copy link
Contributor Author

bobhan1 commented Sep 11, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@bobhan1
Copy link
Contributor Author

bobhan1 commented Sep 11, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.44 seconds
stream load tsv: 602 seconds loaded 74807831229 Bytes, about 118 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: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17162524201 Bytes

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.93% (7919/21443)
Line Coverage: 28.96% (63634/219710)
Region Coverage: 27.89% (33005/118351)
Branch Coverage: 24.46% (16947/69276)
Coverage Report: http://coverage.selectdb-in.cc/coverage/7c46ef71d6527d0196cd2836a7a82e337e2a9fb8_7c46ef71d6527d0196cd2836a7a82e337e2a9fb8/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.93 seconds
stream load tsv: 606 seconds loaded 74807831229 Bytes, about 117 MB/s
stream load json: 24 seconds loaded 2358488459 Bytes, about 93 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162543980 Bytes

@bobhan1
Copy link
Contributor Author

bobhan1 commented Sep 11, 2023

run buildall

@bobhan1
Copy link
Contributor Author

bobhan1 commented Sep 11, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.93% (7920/21444)
Line Coverage: 28.97% (63647/219726)
Region Coverage: 27.90% (33024/118367)
Branch Coverage: 24.47% (16956/69288)
Coverage Report: http://coverage.selectdb-in.cc/coverage/746dd12d4ededf80d2e2bf4b7501521d3fd0a66d_746dd12d4ededf80d2e2bf4b7501521d3fd0a66d/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.32 seconds
stream load tsv: 583 seconds loaded 74807831229 Bytes, about 122 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.9 seconds inserted 10000000 Rows, about 346K ops/s
storage size: 17162213040 Bytes

}
if (!st.ok()) {
return st;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should return a Status::OK() at the end of this method?

Copy link
Contributor

@zhannngchen zhannngchen 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 Sep 11, 2023
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@@ -202,7 +202,13 @@ Status BinaryPrefixPageDecoder::seek_at_or_after_value(const void* value, bool*
return Status::OK();
}
_cur_pos++;
RETURN_IF_ERROR(_read_next_value());
auto st = _read_next_value();
if (st.is<ErrorCode::END_OF_FILE>()) {
Copy link
Contributor

@liaoxin01 liaoxin01 Sep 11, 2023

Choose a reason for hiding this comment

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

Does it have an impact on other users of this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
only IndexedColumnIterator::seek_at_or_after may call BinaryPrefixPageDecoder::seek_at_or_after_value

Copy link
Contributor

@liaoxin01 liaoxin01 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiaokang xiaokang merged commit bdacefa into apache:master Sep 12, 2023
xiaokang pushed a commit that referenced this pull request Sep 12, 2023
xiaokang pushed a commit that referenced this pull request Sep 12, 2023
@xiaokang xiaokang mentioned this pull request Sep 28, 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. dev/2.0.2-merged p0_c reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants