TangSiyang2001 commented on code in PR #39470: URL: https://github.com/apache/doris/pull/39470#discussion_r1719470924
########## be/src/util/once.h: ########## @@ -89,16 +89,15 @@ class DorisCallOnce { return _status; } try { + // This memory order make sure both status and eptr is set + // and will be seen in another thread. + _once_flag.store(true, std::memory_order_release); _status = fn(); } catch (...) { // Save the exception for next call. _eptr = std::current_exception(); Review Comment: How shall we handle exception here to make it visible intime for other threads, for correct rethrowing, and keep it light-weight? -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org