Skip to content

Conversation

@BePPPower
Copy link
Contributor

@BePPPower BePPPower commented Jul 12, 2022

Proposed changes

Issue Number: close #xxx

Problem Summary:

output git commit id when the program coredump。
like this:
image

Checklist(Required)

  1. Does it affect the original behavior: (Yes)
  2. Has unit tests been added: (No Need)
  3. Has document been added or modified: (No Need)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

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

formatter.AppendString(" try \"date -d @");
formatter.AppendUint64(static_cast<uint64>(time_in_sec), 10);
formatter.AppendString("\" if you are using GNU date ***\n");
formatter.AppendString("*** Current BE version: ");
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use this method. These code will allocate memory and string is very complicated. std::string get_build_version(bool compact) {
std::stringstream ss;
ss << DORIS_BUILD_VERSION
#ifdef NDEBUG
<< " RELEASE"
#else
<< " DEBUG"
#endif
<< " (build " << DORIS_BUILD_HASH << ")";

if (!compact) {
    ss << std::endl << "Built on " << DORIS_BUILD_TIME << " by " << DORIS_BUILD_INFO;
}

return ss.str();

}

You could just use the macro

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit 6063c0c into apache:master Jul 13, 2022
eldenmoon pushed a commit to eldenmoon/incubator-doris that referenced this pull request Aug 1, 2022
…pache#10788)

* [enhancement](singal) output git commit id when the program coredump

* modift output info
@BePPPower BePPPower deleted the dev-singal branch August 3, 2022 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants