This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new d07f246c96f branch-3.1: [opt](tvf) longer the timeout of getting file 
list from backend #52774 (#52810)
d07f246c96f is described below

commit d07f246c96f1beda9fb1b8a2ba571db70a279945
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 8 14:17:50 2025 +0800

    branch-3.1: [opt](tvf) longer the timeout of getting file list from backend 
#52774 (#52810)
    
    Cherry-picked from #52774
    
    Co-authored-by: Mingyu Chen (Rayner) <[email protected]>
---
 .../java/org/apache/doris/tablefunction/LocalTableValuedFunction.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/LocalTableValuedFunction.java
 
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/LocalTableValuedFunction.java
index c82552f1862..d9558f5594b 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/LocalTableValuedFunction.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/LocalTableValuedFunction.java
@@ -24,6 +24,7 @@ import org.apache.doris.common.AnalysisException;
 import org.apache.doris.proto.InternalService;
 import org.apache.doris.proto.InternalService.PGlobResponse;
 import org.apache.doris.proto.InternalService.PGlobResponse.PFileInfo;
+import org.apache.doris.qe.ConnectContext;
 import org.apache.doris.rpc.BackendServiceProxy;
 import org.apache.doris.system.Backend;
 import org.apache.doris.thrift.TBrokerFileStatus;
@@ -112,9 +113,10 @@ public class LocalTableValuedFunction extends 
ExternalFileTableValuedFunction {
         TNetworkAddress address = be.getBrpcAddress();
         InternalService.PGlobRequest.Builder requestBuilder = 
InternalService.PGlobRequest.newBuilder();
         requestBuilder.setPattern(filePath);
+        long timeoutS = ConnectContext.get() == null ? 60 : 
Math.min(ConnectContext.get().getQueryTimeoutS(), 60);
         try {
             Future<PGlobResponse> response = proxy.glob(address, 
requestBuilder.build());
-            PGlobResponse globResponse = response.get(5, TimeUnit.SECONDS);
+            PGlobResponse globResponse = response.get(timeoutS, 
TimeUnit.SECONDS);
             if (globResponse.getStatus().getStatusCode() != 0) {
                 throw new AnalysisException(
                         "error code: " + 
globResponse.getStatus().getStatusCode()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to