morningman commented on a change in pull request #7032: URL: https://github.com/apache/incubator-doris/pull/7032#discussion_r745358245
########## File path: gensrc/thrift/HeartbeatService.thrift ########## @@ -46,5 +53,5 @@ struct THeartbeatResult { } service HeartbeatService { - THeartbeatResult heartbeat(1:TMasterInfo master_info); -} + THeartbeatResult heartbeat(1:TMasterInfo master_info, 2:list<TFrontendInfo> frontend_info); Review comment: This may not be compatible. ########## File path: gensrc/thrift/FrontendService.thrift ########## @@ -695,6 +695,7 @@ struct TFrontendPingFrontendResult { 4: required i32 rpcPort 5: required i64 replayedJournalId 6: required string version + 7: required i64 startTime Review comment: Should be optional ########## File path: be/src/runtime/exec_env.h ########## @@ -219,6 +225,9 @@ class ExecEnv { HeartbeatFlags* _heartbeat_flags = nullptr; PluginMgr* _plugin_mgr = nullptr; + + std::map<std::string, FrontendStartInfo*> _frontends_start_time; Review comment: use unordered map. And this structure need to be protected by lock, you can try using `phmap::parallel_flat_hash_map`, which is a concurrent hash map of C++. You can refer to `be/src/util/brpc_stub_cache.h` ########## File path: gensrc/thrift/HeartbeatService.thrift ########## @@ -31,6 +31,13 @@ struct TMasterInfo { 8: optional i64 backend_id } +// Contain master +struct TFrontendInfo { + 1: required Types.TNetworkAddress network_address Review comment: use optional -- 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