mymeiyi commented on code in PR #39986: URL: https://github.com/apache/doris/pull/39986#discussion_r1732526560
########## fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java: ########## @@ -433,9 +433,29 @@ private TNetworkAddress selectLocalRedirectBackend(boolean groupCommit, HttpServ return new TNetworkAddress(backend.getHost(), backend.getHttpPort()); } - private TNetworkAddress selectCloudRedirectBackend(String clusterName, HttpServletRequest req, boolean groupCommit) + private TNetworkAddress selectCloudRedirectBackend(String clusterName, HttpServletRequest req, boolean groupCommit, + long tableId) throws LoadException { - Backend backend = StreamLoadHandler.selectBackend(clusterName, groupCommit); + Backend backend = null; + if (groupCommit) { + ConnectContext ctx = new ConnectContext(); + ctx.setEnv(Env.getCurrentEnv()); + ctx.setThreadLocalInfo(); + ctx.setRemoteIP(req.getRemoteAddr()); + // We set this variable to fulfill required field 'user' in + // TMasterOpRequest(FrontendService.thrift) + ctx.setQualifiedUser(Auth.ADMIN_USER); Review Comment: this is generally the same as selectLocalRedirectBackend, it's better to abstract it -- 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