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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 357d05729a5 branch-4.0: [fix](tvf) fix tvf return error since thrift 
message too large to reach limit #61788 (#62322)
357d05729a5 is described below

commit 357d05729a5562107469cf795611ca2d43787e01
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Apr 15 12:27:57 2026 +0800

    branch-4.0: [fix](tvf) fix tvf return error since thrift message too large 
to reach limit #61788 (#62322)
    
    Cherry-picked from #61788
    
    Co-authored-by: Guangming Lu <[email protected]>
    Co-authored-by: Vallish Pai <[email protected]>
---
 be/src/common/config.cpp    | 2 +-
 be/src/common/config.h      | 2 +-
 be/src/util/thrift_client.h | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index ac5a8224e1d..35ed48c6357 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -332,7 +332,7 @@ DEFINE_mInt32(thrift_connect_timeout_seconds, "3");
 DEFINE_mInt64(thrift_client_retry_interval_ms, "1000");
 // max message size of thrift request
 // default: 100 * 1024 * 1024
-DEFINE_mInt64(thrift_max_message_size, "104857600");
+DEFINE_mInt32(thrift_max_message_size, "104857600");
 // max bytes number for single scan range, used in segmentv2
 DEFINE_mInt32(doris_scan_range_max_mb, "1024");
 // single read execute fragment row number
diff --git a/be/src/common/config.h b/be/src/common/config.h
index e3189d11a95..975fcbeff99 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -393,7 +393,7 @@ DECLARE_mInt32(thrift_connect_timeout_seconds);
 DECLARE_mInt64(thrift_client_retry_interval_ms);
 // max message size of thrift request
 // default: 100 * 1024 * 1024
-DECLARE_mInt64(thrift_max_message_size);
+DECLARE_mInt32(thrift_max_message_size);
 // max bytes number for single scan range, used in segmentv2
 DECLARE_mInt32(doris_scan_range_max_mb);
 // single read execute fragment row number
diff --git a/be/src/util/thrift_client.h b/be/src/util/thrift_client.h
index e60bc32af72..e03fd8be1ce 100644
--- a/be/src/util/thrift_client.h
+++ b/be/src/util/thrift_client.h
@@ -105,6 +105,7 @@ template <class InterfaceType>
 ThriftClient<InterfaceType>::ThriftClient(const std::string& ipaddress, int 
port)
         : ThriftClientImpl(ipaddress, port) {
     _transport.reset(new 
apache::thrift::transport::TBufferedTransport(_socket));
+    
_transport->getConfiguration()->setMaxMessageSize(config::thrift_max_message_size);
     _protocol.reset(new apache::thrift::protocol::TBinaryProtocol(_transport));
     _iface.reset(new InterfaceType(_protocol));
 }
@@ -116,10 +117,12 @@ ThriftClient<InterfaceType>::ThriftClient(const 
std::string& ipaddress, int port
     switch (server_type) {
     case ThriftServer::NON_BLOCKING:
         _transport.reset(new 
apache::thrift::transport::TFramedTransport(_socket));
+        
_transport->getConfiguration()->setMaxMessageSize(config::thrift_max_message_size);
         break;
     case ThriftServer::THREADED:
     case ThriftServer::THREAD_POOL:
         _transport.reset(new 
apache::thrift::transport::TBufferedTransport(_socket));
+        
_transport->getConfiguration()->setMaxMessageSize(config::thrift_max_message_size);
         break;
     default:
         std::stringstream error_msg;


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

Reply via email to