Skip to content

Conversation

@AshinGau
Copy link
Member

@AshinGau AshinGau commented May 15, 2024

Proposed changes

Followup #34797
static_cast<void> has ignored the wrong status, some of them should make the query finished with error status, so replace static_cast<void> with RETURN_IF_ERROR.

Remaining Works

The following three scenarios need to be handled separately and cannot be simply replaced:

  1. The outer function returns void;
  2. Call status function inner constructors or destructors;
  3. Call status function with best effort, and should ignore the wrong status.

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

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@AshinGau
Copy link
Member Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.69% (9005/25234)
Line Coverage: 27.37% (74520/272297)
Region Coverage: 26.61% (38536/144835)
Branch Coverage: 23.43% (19661/83900)
Coverage Report: http://coverage.selectdb-in.cc/coverage/599be32084bbf5bf7969fd866f9d1d121f1f7781_599be32084bbf5bf7969fd866f9d1d121f1f7781/report/index.html

LOG(WARNING) << "fail to close wal " << _file_name << " st= " << st.to_string();
}
if (file_reader) {
return file_reader->close();
Copy link
Contributor

Choose a reason for hiding this comment

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

@w41ter PTAL, I not sure why we ignore the error before

Copy link
Contributor

Choose a reason for hiding this comment

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

It should have been returned but was left out. This change is LGTM.

Status init_reader(
std::unordered_map<std::string, ColumnValueRangeType>* colname_to_value_range);

Status close() override {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as parent, no need to override


TypeDescriptor convert_complex_type(const rapidjson::Document::ConstObject child_schema);

Status close() override {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as parent, no need to override

Status init_reader(
std::unordered_map<std::string, ColumnValueRangeType>* colname_to_value_range);

Status close() override {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as parent, no need to override

Status init_reader(
std::unordered_map<std::string, ColumnValueRangeType>* colname_to_value_range);

Status close() override {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as parent, no need to override

Status init_reader(
std::unordered_map<std::string, ColumnValueRangeType>* colname_to_value_range);

Status close() override {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

_wal_id = state->wal_id();
}

WalReader::~WalReader() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@w41ter PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

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

@AshinGau
Copy link
Member Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.69% (9006/25236)
Line Coverage: 27.35% (74491/272314)
Region Coverage: 26.59% (38524/144858)
Branch Coverage: 23.43% (19659/83914)
Coverage Report: http://coverage.selectdb-in.cc/coverage/2414c7c823d833958608a0954f98bc80ed50323c_2414c7c823d833958608a0954f98bc80ed50323c/report/index.html

@AshinGau
Copy link
Member Author

run buildall

@github-actions
Copy link
Contributor

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

@AshinGau
Copy link
Member Author

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: 35.68% (9012/25259)
Line Coverage: 27.33% (74514/272616)
Region Coverage: 26.58% (38538/144990)
Branch Coverage: 23.41% (19660/83972)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b57d7b64108884016c54601137c335f3732d9c44_b57d7b64108884016c54601137c335f3732d9c44/report/index.html

Copy link
Contributor

@morningman morningman 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 May 22, 2024
@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.

@morningman morningman merged commit 84bef60 into apache:master May 22, 2024
yiguolei pushed a commit that referenced this pull request May 23, 2024
…oid> (#34873)

Followup #34797
`static_cast<void>` has ignored the wrong status, some of them should make the query finished with error status, so replace `static_cast<void>`  with `RETURN_IF_ERROR`.

The following three scenarios need to be handled separately and cannot be simply replaced:
1. The outer function returns void;
2. Call status function inner constructors or destructors;
3. Call status function with best effort, and should ignore the wrong status.
dataroaring pushed a commit that referenced this pull request May 26, 2024
…oid> (#34873)

Followup #34797
`static_cast<void>` has ignored the wrong status, some of them should make the query finished with error status, so replace `static_cast<void>`  with `RETURN_IF_ERROR`.

### Remaining Works
The following three scenarios need to be handled separately and cannot be simply replaced:
1. The outer function returns void;
2. Call status function inner constructors or destructors;
3. Call status function with best effort, and should ignore the wrong status.
@AshinGau AshinGau removed the dev/2.0.x label Jun 7, 2024
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.1.4-merged dev/3.0.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants