This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 9e852a7a2f7 [fix](thirdparty) patch libevent to enable keepalive on
tcp (#36026)
9e852a7a2f7 is described below
commit 9e852a7a2f70f7d546d592ba328842f85ec48299
Author: Yongqiang YANG <[email protected]>
AuthorDate: Mon Jun 10 08:58:45 2024 +0800
[fix](thirdparty) patch libevent to enable keepalive on tcp (#36026)
Followup #35805, fix patch issue and compile issue of libevent
---
thirdparty/download-thirdparty.sh | 2 ++
thirdparty/patches/libevent-1532.patch | 12 ------------
...socket.patch => libevent-keepalive-accepted-socket.patch} | 4 ++--
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index 4a3d8d5a623..ca26f448970 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -305,6 +305,8 @@ if [[ " ${TP_ARCHIVES[*]} " =~ " LIBEVENT " ]]; then
cd "${TP_SOURCE_DIR}/${LIBEVENT_SOURCE}"
if [[ ! -f "${PATCHED_MARK}" ]]; then
patch -p1 <"${TP_PATCH_DIR}/libevent.patch"
+ patch -p1 <"${TP_PATCH_DIR}/libevent-1532.patch"
+ patch -p1 <"${TP_PATCH_DIR}/libevent-keepalive-accepted-socket.patch"
touch "${PATCHED_MARK}"
fi
cd -
diff --git a/thirdparty/patches/libevent-1532.patch
b/thirdparty/patches/libevent-1532.patch
index 1ad62baf06d..d05c99accc2 100644
--- a/thirdparty/patches/libevent-1532.patch
+++ b/thirdparty/patches/libevent-1532.patch
@@ -186,15 +186,3 @@ index 02aa7ba..688b641 100644
#ifdef _WIN32
/** Return the most recent socket error. Not idempotent on all platforms. */
#define EVUTIL_SOCKET_ERROR() WSAGetLastError()
-diff --git a/listener.c b/listener.c
-index f5c00c9..424b28c 100644
---- a/listener.c
-+++ b/listener.c
-@@ -214,7 +214,6 @@ evconnlistener_new_bind(struct event_base *base,
evconnlistener_cb cb,
- {
- struct evconnlistener *listener;
- evutil_socket_t fd;
-- int on = 1;
- int family = sa ? sa->sa_family : AF_UNSPEC;
- int socktype = SOCK_STREAM | EVUTIL_SOCK_NONBLOCK;
-
diff --git a/thirdparty/patches/libevent-enable_keepalive_accepted_socket.patch
b/thirdparty/patches/libevent-keepalive-accepted-socket.patch
similarity index 90%
rename from thirdparty/patches/libevent-enable_keepalive_accepted_socket.patch
rename to thirdparty/patches/libevent-keepalive-accepted-socket.patch
index 0839ba0c6d6..84a9d7b1ea6 100644
--- a/thirdparty/patches/libevent-enable_keepalive_accepted_socket.patch
+++ b/thirdparty/patches/libevent-keepalive-accepted-socket.patch
@@ -1,5 +1,5 @@
diff --git a/http.c b/http.c
-index 53951cb..85d4d67 100644
+index 1ad60f8..267fa1f 100644
--- a/http.c
+++ b/http.c
@@ -4265,6 +4265,12 @@ evhttp_get_request_connection(
@@ -8,7 +8,7 @@ index 53951cb..85d4d67 100644
+ if (sa->sa_family != AF_UNIX) {
+ if (evutil_set_tcp_keepalive(fd, 1, 300) < 0) {
-+ return (NULL)
++ return (NULL);
+ }
+ }
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]