morningman commented on code in PR #22272: URL: https://github.com/apache/doris/pull/22272#discussion_r1278260342
########## fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/manager/HttpUtils.java: ########## @@ -49,6 +49,7 @@ */ public class HttpUtils { static final int REQUEST_SUCCESS_CODE = 0; + static final int DEFAULT_TIME_OUT = 2000; Review Comment: Add unit of this time, eg, `DEFAULT_TIME_OUT_MS` ########## fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java: ########## @@ -1642,13 +1640,19 @@ private void getNewImage(HostInfo helperNode) throws IOException { try { String hostPort = NetUtils.getHostPortInAccessibleFormat(helperNode.getHost(), Config.http_port); String infoUrl = "http://" + hostPort + "/info"; - StorageInfo info = getStorageInfo(infoUrl); + ResponseBody<StorageInfo> responseBody = MetaHelper + .doGet(infoUrl, HTTP_TIMEOUT_SECOND * 1000, StorageInfo.class); Review Comment: Is this should be `StorageInfoV2`? ########## fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/manager/HttpUtils.java: ########## @@ -74,12 +75,16 @@ static String concatUrl(Pair<String, Integer> ipPort, String path, Map<String, S return url.toString(); } - static String doGet(String url, Map<String, String> headers) throws IOException { + public static String doGet(String url, Map<String, String> headers, int timeout) throws IOException { Review Comment: ```suggestion public static String doGet(String url, Map<String, String> headers, int timeoutMs) throws IOException { ``` -- 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