This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new d57690e7739 [fix](group commit) Fix test_group_commit_http_stream (#33375) d57690e7739 is described below commit d57690e77399885570047e6773a030e5eb82e284 Author: meiyi <myime...@gmail.com> AuthorDate: Wed Apr 10 10:18:24 2024 +0800 [fix](group commit) Fix test_group_commit_http_stream (#33375) --- .../main/java/org/apache/doris/service/FrontendServiceImpl.java | 4 ++++ .../doris/tablefunction/ExternalFileTableValuedFunction.java | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java index 846e646238c..2a183842ef4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java @@ -1905,6 +1905,8 @@ public class FrontendServiceImpl implements FrontendService.Iface { StreamLoadHandler streamLoadHandler = new StreamLoadHandler(request, null, result, clientAddr); try { + // Some requests forget to remove the ConnectContext, so remove it firstly + ConnectContext.remove(); streamLoadHandler.setCloudCluster(); List<TPipelineWorkloadGroup> tWorkloadGroupList = null; @@ -1998,6 +2000,8 @@ public class FrontendServiceImpl implements FrontendService.Iface { status.setStatusCode(TStatusCode.INTERNAL_ERROR); status.addToErrorMsgs(e.getClass().getSimpleName() + ": " + Strings.nullToEmpty(e.getMessage())); return result; + } finally { + ConnectContext.remove(); } if (Config.enable_pipeline_load) { result.setPipelineParams(planFragmentParamsList); diff --git a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java index 260f7b2df44..ac7cf44b525 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java +++ b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java @@ -379,12 +379,14 @@ public abstract class ExternalFileTableValuedFunction extends TableValuedFunctio } protected Backend getBackend() { - ConnectContext ctx = ConnectContext.get(); // For the http stream task, we should obtain the be for processing the task - long backendId = ctx.getBackendId(); if (getTFileType() == TFileType.FILE_STREAM) { + long backendId = ConnectContext.get().getBackendId(); Backend be = Env.getCurrentSystemInfo().getIdToBackend().get(backendId); - if (be == null || be.isAlive()) { + if (be == null || !be.isAlive()) { + LOG.warn("Backend {} is not alive", backendId); + return null; + } else { return be; } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org