Skip to content

Conversation

@deardeng
Copy link
Contributor

cherry pick from #43253

@deardeng
Copy link
Contributor Author

run buildall

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

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

std::pair<bool, std::string> ResourceManager::get_instance_id_by_cloud_unique_id(
const std::string& cloud_unique_id) {
auto v = split(cloud_unique_id, ':');
if (v.size() != 3) return {false, ""};
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: statement should be inside braces [readability-braces-around-statements]

Suggested change
if (v.size() != 3) return {false, ""};
if (v.size() != 3) { return {false, ""};
}

if (v.size() != 3) return {false, ""};
// degraded format check it
int version = std::atoi(v[0].c_str());
if (version != 1) return {false, ""};
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: statement should be inside braces [readability-braces-around-statements]

Suggested change
if (version != 1) return {false, ""};
if (version != 1) { return {false, ""};
}

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 13, 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.

@dataroaring dataroaring merged commit ae09157 into apache:branch-3.0 Nov 13, 2024
@gavinchou gavinchou mentioned this pull request Nov 26, 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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants