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

morningman 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 4c241d88583 [opt](tvf) longer the timeout of getting file list from 
backend (#52774)
4c241d88583 is described below

commit 4c241d8858349598279910e9650cab872b416532
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Fri Jul 4 21:56:42 2025 +0800

    [opt](tvf) longer the timeout of getting file list from backend (#52774)
    
    ### What problem does this PR solve?
    
    Sometimes the local tvf test may timeout when getting file list from
    backend.
    This may because the backend io is busy or using ASAN compilation
    option.
    So I change the default timeout to `min(60, query_timeout)`, to longer
    this timeout,
    to make test happy.
    
    This will not effect the real user cases.
---
 .../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 d214e50a846..9d7ac8e2057 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
@@ -26,6 +26,7 @@ import 
org.apache.doris.datasource.property.storage.StorageProperties;
 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;
@@ -113,9 +114,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