This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 7085e764e5d branch-4.1: [fix](tvf) fix tvf return error since thrift
message too large to reach limit #61788 (#62323)
7085e764e5d is described below
commit 7085e764e5d24eee44e042980abdddb3013fc393
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Apr 11 20:20:34 2026 +0800
branch-4.1: [fix](tvf) fix tvf return error since thrift message too large
to reach limit #61788 (#62323)
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 6277a37da91..fb4a6df2c06 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -334,7 +334,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 bbcaf4b9e1e..7c901951df8 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -395,7 +395,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]