From 3ccfb7bc059649ef73e8576ecc7dcc74c4bdaef1 Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Wed, 28 Sep 2022 18:27:20 +0800 Subject: [PATCH] Revert "*: supress grpc "tcp set inq" loggings (#5797)" This reverts commit 4a56b07624dbb9ba9f0f9c235b9ef335529d93f0. --- ...01-disable-tcp-set-inq-debug-message.patch | 26 ----------------- contrib/grpc-cmake/CMakeLists.txt | 28 +------------------ 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 contrib/grpc-cmake/0001-disable-tcp-set-inq-debug-message.patch diff --git a/contrib/grpc-cmake/0001-disable-tcp-set-inq-debug-message.patch b/contrib/grpc-cmake/0001-disable-tcp-set-inq-debug-message.patch deleted file mode 100644 index 86affb1dfd0..00000000000 --- a/contrib/grpc-cmake/0001-disable-tcp-set-inq-debug-message.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 329cf5f20cd35369667d114404d80e49e5109d3d Mon Sep 17 00:00:00 2001 -From: JaySon-Huang -Date: Tue, 6 Sep 2022 15:24:15 +0800 -Subject: [PATCH] disable tcp set inq debug message - -Signed-off-by: JaySon-Huang ---- - src/core/lib/iomgr/tcp_posix.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc -index 3c943b0e53..6223983558 100644 ---- a/src/core/lib/iomgr/tcp_posix.cc -+++ b/src/core/lib/iomgr/tcp_posix.cc -@@ -1790,7 +1790,7 @@ grpc_endpoint* grpc_tcp_create(grpc_fd* em_fd, - if (setsockopt(tcp->fd, SOL_TCP, TCP_INQ, &one, sizeof(one)) == 0) { - tcp->inq_capable = true; - } else { -- gpr_log(GPR_DEBUG, "cannot set inq fd=%d errno=%d", tcp->fd, errno); -+ //gpr_log(GPR_DEBUG, "cannot set inq fd=%d errno=%d", tcp->fd, errno); - tcp->inq_capable = false; - } - #else --- -2.37.2 - diff --git a/contrib/grpc-cmake/CMakeLists.txt b/contrib/grpc-cmake/CMakeLists.txt index 9d3325ac8cb..cecbfe2cc95 100644 --- a/contrib/grpc-cmake/CMakeLists.txt +++ b/contrib/grpc-cmake/CMakeLists.txt @@ -81,35 +81,9 @@ if(TIFLASH_LLVM_TOOLCHAIN) target_compile_options(grpc PRIVATE -Wno-deprecated-declarations -Wno-non-c-typedef-for-linkage -Wno-implicit-const-int-float-conversion) target_compile_options(grpc++ PRIVATE - -Wno-deprecated-declarations -Wno-non-c-typedef-for-linkage -Wno-implicit-const-int-float-conversion) + -Wno-deprecated-declarations -Wno-non-c-typedef-for-linkage -Wno-implicit-const-int-float-conversion) endif() -execute_process( - COMMAND grep "//gpr_log(GPR_DEBUG, \"cannot set inq fd=%d errno=%d\", tcp->fd, errno);" "${_gRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_posix.cc" - RESULT_VARIABLE HAVE_APPLY_PATCH) -# grep - Normally, the exit status is 0 if selected lines are found and 1 otherwise. But the exit status is 2 if an error occurred. -if (HAVE_APPLY_PATCH EQUAL 1) - message(STATUS "grpc patch not apply: ${HAVE_APPLY_PATCH}, patching...") - # update the patch using `git format-patch` if you upgrade grpc - set (GRPC_PATCH_FILE "${TiFlash_SOURCE_DIR}/contrib/grpc-cmake/0001-disable-tcp-set-inq-debug-message.patch") - # apply the patch - execute_process( - COMMAND git apply -v "${GRPC_PATCH_FILE}" - WORKING_DIRECTORY "${_gRPC_SOURCE_DIR}" - COMMAND_ECHO STDOUT - RESULT_VARIABLE PATCH_SUCC) - if (NOT PATCH_SUCC EQUAL 0) - message(FATAL_ERROR "Can not apply grpc patch ${GRPC_PATCH_FILE}") - else () - message(STATUS "grpc patch done") - endif () -elseif (HAVE_APPLY_PATCH EQUAL 0) - message(STATUS "grpc patch have been applied: ${HAVE_APPLY_PATCH}") -else () - message(FATAL_ERROR "Can not check the grpc patch status") -endif () - - # The contrib/grpc/CMakeLists.txt redefined the PROTOBUF_GENERATE_GRPC_CPP() function for its own purposes, # so we need to redefine it back. include("${TiFlash_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")