You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/12 10:16:12 UTC

[GitHub] [doris] yiguolei commented on a diff in pull request #10788: [enhancement](singal) output git commit id when the program coredump

yiguolei commented on code in PR #10788:
URL: https://github.com/apache/doris/pull/10788#discussion_r918798102


##########
be/src/common/signal_handler.h:
##########
@@ -254,6 +256,9 @@ void DumpTimeInfo() {
     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: ");

Review Comment:
   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 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org