This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new ed1db08a17e branch-2.1: [fix](thrift) Pick THRIFT-5492: Add readEnd to
TBufferedTransport #49649 (#49656)
ed1db08a17e is described below
commit ed1db08a17e31d472d15274e1bc276dcc1feac47
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Mar 29 20:22:09 2025 +0800
branch-2.1: [fix](thrift) Pick THRIFT-5492: Add readEnd to
TBufferedTransport #49649 (#49656)
Cherry-picked from #49649
Co-authored-by: walter <[email protected]>
---
thirdparty/download-thirdparty.sh | 17 +++++++++++++
.../thrift-0.16-reset-consumed-message-size.patch | 29 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index ac000ead7e7..c7f2eea4c37 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -455,4 +455,21 @@ else
fi
fi
+# patch thrift
+if [[ " ${TP_ARCHIVES[*]} " =~ " THRIFT " ]]; then
+ if [[ "${THRIFT_SOURCE}" == 'thrift-0.16.0' ]]; then
+ cd "${TP_SOURCE_DIR}/${THRIFT_SOURCE}"
+ if [[ ! -f "${PATCHED_MARK}" ]]; then
+ for patch_file in "${TP_PATCH_DIR}"/thrift-0.16*; do
+ echo "patch ${patch_file}"
+ patch -p1 --ignore-whitespace <"${patch_file}"
+ done
+ touch "${PATCHED_MARK}"
+ fi
+ cd -
+ fi
+ echo "Finished patching ${THRIFT_SOURCE}"
+fi
+
+
# vim: ts=4 sw=4 ts=4 tw=100:
diff --git a/thirdparty/patches/thrift-0.16-reset-consumed-message-size.patch
b/thirdparty/patches/thrift-0.16-reset-consumed-message-size.patch
new file mode 100644
index 00000000000..a760e3742db
--- /dev/null
+++ b/thirdparty/patches/thrift-0.16-reset-consumed-message-size.patch
@@ -0,0 +1,29 @@
+From 89e0bc5fa4949b68503f7b6892128cc8fc5bc1d4 Mon Sep 17 00:00:00 2001
+From: Steve Licking <[email protected]>
+Date: Fri, 31 Dec 2021 10:54:05 -0800
+Subject: [PATCH] THRIFT-5492: Add readEnd to TBufferedTransport client: cpp
+ Patch: Steve Licking
+
+---
+ lib/cpp/src/thrift/transport/TBufferTransports.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.h
b/lib/cpp/src/thrift/transport/TBufferTransports.h
+index 179934ba0..6feb540af 100644
+--- a/lib/cpp/src/thrift/transport/TBufferTransports.h
++++ b/lib/cpp/src/thrift/transport/TBufferTransports.h
+@@ -270,6 +270,11 @@ public:
+ */
+ uint32_t readAll(uint8_t* buf, uint32_t len) { return
TBufferBase::readAll(buf, len); }
+
++ uint32_t readEnd() override {
++ resetConsumedMessageSize();
++ return 0;
++ }
++
+ protected:
+ void initPointers() {
+ setReadBuffer(rBuf_.get(), 0);
+--
+2.39.3
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]