gavinchou commented on code in PR #43461: URL: https://github.com/apache/doris/pull/43461#discussion_r1832724417
########## common/cpp/sync_point.h: ########## @@ -187,11 +188,13 @@ auto try_any_cast_ret(std::vector<std::any>& any) { #define SYNC_POINT_CALLBACK(x, ...) doris::SyncPoint::get_instance()->process(x, {__VA_ARGS__}) #define SYNC_POINT_RETURN_WITH_VALUE(x, default_ret_val, ...) \ { \ - std::pair ret {default_ret_val, false}; \ - std::vector<std::any> args {__VA_ARGS__}; \ - args.emplace_back(&ret); \ - doris::SyncPoint::get_instance()->process(x, std::move(args)); \ - if (ret.second) return std::move(ret.first); \ + if (doris::SyncPoint::get_instance()->has_point(x)) { \ Review Comment: also check sycnpiont enabeld ########## common/cpp/sync_point.h: ########## @@ -153,6 +153,7 @@ class SyncPoint { // And/or call registered callback function, with argument `cb_args` void process(const std::string& point, std::vector<std::any>&& cb_args = {}); + bool has_point(const std::string& point); Review Comment: add comment for interface -- 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