Fix brpc compile error (#16418)

The graduation of the brpc project caused the file md5 to change
This commit is contained in:
wangruin 2023-01-10 13:34:49 +08:00 committed by GitHub
parent 1b65ab9a64
commit a7222ea76d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 39 deletions

View File

@ -175,7 +175,7 @@ protected:
// If the bthread is blocked by pthread primitive, the current bthread cannot release the bind pthread and cannot be yield.
// In this way, the available pthread become less and the scheduling of bthread would be influenced.
// So, we should execute the function that may use pthread block primitive in a specific thread pool.
// More detail: https://github.com/apache/incubator-brpc/blob/master/docs/cn/bthread.md
// More detail: https://github.com/apache/brpc/blob/master/docs/cn/bthread.md
// Thread pool for executing task asynchronously in BRPC call.
PriorityThreadPool _async_thread_pool;

View File

@ -34,7 +34,7 @@ class ThreadPool;
namespace starrocks::bthreads {
// Used to run bthread::ExecutionQueue task in pthread instead of bthread.
// Reference: https://github.com/apache/incubator-brpc/blob/master/docs/cn/execution_queue.md
// Reference: https://github.com/apache/brpc/blob/master/docs/cn/execution_queue.md
class ThreadPoolExecutor : public bthread::Executor {
public:
constexpr static int64_t kDefaultBusySleepMs = 50;

View File

@ -291,16 +291,16 @@ echo "Finished patching $LZ4_SOURCE"
# brpc patch to disable shared library
cd $TP_SOURCE_DIR/$BRPC_SOURCE
if [ ! -f $PATCHED_MARK ] && [ $BRPC_SOURCE == "incubator-brpc-0.9.5" ]; then
patch -p1 < $TP_PATCH_DIR/incubator-brpc-0.9.5.patch
if [ ! -f $PATCHED_MARK ] && [ $BRPC_SOURCE == "brpc-0.9.5" ]; then
patch -p1 < $TP_PATCH_DIR/brpc-0.9.5.patch
touch $PATCHED_MARK
fi
if [ ! -f $PATCHED_MARK ] && [ $BRPC_SOURCE == "incubator-brpc-0.9.7" ]; then
patch -p1 < $TP_PATCH_DIR/incubator-brpc-0.9.7.patch
if [ ! -f $PATCHED_MARK ] && [ $BRPC_SOURCE == "brpc-0.9.7" ]; then
patch -p1 < $TP_PATCH_DIR/brpc-0.9.7.patch
touch $PATCHED_MARK
fi
if [ ! -f $PATCHED_MARK ] && [ $BRPC_SOURCE == "incubator-brpc-1.3.0" ]; then
patch -p1 < $TP_PATCH_DIR/incubator-brpc-1.3.0.patch
if [ ! -f $PATCHED_MARK ] && [ $BRPC_SOURCE == "brpc-1.3.0" ]; then
patch -p1 < $TP_PATCH_DIR/brpc-1.3.0.patch
touch $PATCHED_MARK
fi
cd -

View File

@ -1,6 +1,6 @@
diff -urN incubator-brpc-0.9.5-origin/CMakeLists.txt incubator-brpc-0.9.5/CMakeLists.txt
--- incubator-brpc-0.9.5-origin/CMakeLists.txt 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/CMakeLists.txt 2021-08-03 19:36:05.563254393 +0800
diff -urN brpc-0.9.5-origin/CMakeLists.txt brpc-0.9.5/CMakeLists.txt
--- brpc-0.9.5-origin/CMakeLists.txt 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/CMakeLists.txt 2021-08-03 19:36:05.563254393 +0800
@@ -89,13 +89,13 @@
macro(use_cxx11)
if(CMAKE_VERSION VERSION_LESS "3.1.3")
@ -39,9 +39,9 @@ diff -urN incubator-brpc-0.9.5-origin/CMakeLists.txt incubator-brpc-0.9.5/CMakeL
${LEVELDB_LIB}
${PROTOC_LIB}
${CMAKE_THREAD_LIBS_INIT}
diff -urN incubator-brpc-0.9.5-origin/src/bthread/context.cpp incubator-brpc-0.9.5/src/bthread/context.cpp
--- incubator-brpc-0.9.5-origin/src/bthread/context.cpp 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/src/bthread/context.cpp 2021-08-03 19:27:17.002700292 +0800
diff -urN brpc-0.9.5-origin/src/bthread/context.cpp brpc-0.9.5/src/bthread/context.cpp
--- brpc-0.9.5-origin/src/bthread/context.cpp 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/src/bthread/context.cpp 2021-08-03 19:27:17.002700292 +0800
@@ -600,3 +600,106 @@
);
@ -149,9 +149,9 @@ diff -urN incubator-brpc-0.9.5-origin/src/bthread/context.cpp incubator-brpc-0.9
+);
+
+#endif
diff -urN incubator-brpc-0.9.5-origin/src/bthread/context.h incubator-brpc-0.9.5/src/bthread/context.h
--- incubator-brpc-0.9.5-origin/src/bthread/context.h 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/src/bthread/context.h 2021-08-03 19:27:17.003700327 +0800
diff -urN brpc-0.9.5-origin/src/bthread/context.h brpc-0.9.5/src/bthread/context.h
--- brpc-0.9.5-origin/src/bthread/context.h 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/src/bthread/context.h 2021-08-03 19:27:17.003700327 +0800
@@ -30,6 +30,9 @@
#elif __arm__
#define BTHREAD_CONTEXT_PLATFORM_linux_arm32
@ -162,9 +162,9 @@ diff -urN incubator-brpc-0.9.5-origin/src/bthread/context.h incubator-brpc-0.9.5
#endif
#elif defined(__MINGW32__) || defined (__MINGW64__)
diff -urN incubator-brpc-0.9.5-origin/src/bthread/processor.h incubator-brpc-0.9.5/src/bthread/processor.h
--- incubator-brpc-0.9.5-origin/src/bthread/processor.h 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/src/bthread/processor.h 2021-08-03 19:27:17.003700327 +0800
diff -urN brpc-0.9.5-origin/src/bthread/processor.h brpc-0.9.5/src/bthread/processor.h
--- brpc-0.9.5-origin/src/bthread/processor.h 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/src/bthread/processor.h 2021-08-03 19:27:17.003700327 +0800
@@ -20,9 +20,13 @@
#define BTHREAD_PROCESSOR_H
@ -182,9 +182,9 @@ diff -urN incubator-brpc-0.9.5-origin/src/bthread/processor.h incubator-brpc-0.9
// Compile read-write barrier
# ifndef barrier
diff -urN incubator-brpc-0.9.5-origin/src/butil/config.h incubator-brpc-0.9.5/src/butil/config.h
--- incubator-brpc-0.9.5-origin/src/butil/config.h 1970-01-01 08:00:00.000000000 +0800
+++ incubator-brpc-0.9.5/src/butil/config.h 2021-08-03 19:27:17.003700327 +0800
diff -urN brpc-0.9.5-origin/src/butil/config.h brpc-0.9.5/src/butil/config.h
--- brpc-0.9.5-origin/src/butil/config.h 1970-01-01 08:00:00.000000000 +0800
+++ brpc-0.9.5/src/butil/config.h 2021-08-03 19:27:17.003700327 +0800
@@ -0,0 +1,6 @@
+#ifndef BUTIL_CONFIG_H
+#define BUTIL_CONFIG_H
@ -192,9 +192,9 @@ diff -urN incubator-brpc-0.9.5-origin/src/butil/config.h incubator-brpc-0.9.5/sr
+#define BRPC_WITH_GLOG 1
+
+#endif // BUTIL_CONFIG_H
diff -urN incubator-brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-internal.h incubator-brpc-0.9.5/src/butil/third_party/snappy/snappy-internal.h
--- incubator-brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-internal.h 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/src/butil/third_party/snappy/snappy-internal.h 2021-08-03 19:27:17.003700327 +0800
diff -urN brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-internal.h brpc-0.9.5/src/butil/third_party/snappy/snappy-internal.h
--- brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-internal.h 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/src/butil/third_party/snappy/snappy-internal.h 2021-08-03 19:27:17.003700327 +0800
@@ -132,7 +132,7 @@
matched += 4;
}
@ -204,9 +204,9 @@ diff -urN incubator-brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-intern
int matching_bits = Bits::FindLSBSetNonZero(x);
matched += matching_bits >> 3;
} else {
diff -urN incubator-brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-stubs-internal.h incubator-brpc-0.9.5/src/butil/third_party/snappy/snappy-stubs-internal.h
--- incubator-brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-stubs-internal.h 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/src/butil/third_party/snappy/snappy-stubs-internal.h 2021-08-03 19:27:17.003700327 +0800
diff -urN brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-stubs-internal.h brpc-0.9.5/src/butil/third_party/snappy/snappy-stubs-internal.h
--- brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-stubs-internal.h 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/src/butil/third_party/snappy/snappy-stubs-internal.h 2021-08-03 19:27:17.003700327 +0800
@@ -35,6 +35,7 @@
#include <assert.h>
#include <stdlib.h>
@ -246,9 +246,9 @@ diff -urN incubator-brpc-0.9.5-origin/src/butil/third_party/snappy/snappy-stubs-
memcpy(p, &v, sizeof v);
}
diff -urN incubator-brpc-0.9.5-origin/src/CMakeLists.txt incubator-brpc-0.9.5/src/CMakeLists.txt
--- incubator-brpc-0.9.5-origin/src/CMakeLists.txt 2018-10-30 12:00:24.000000000 +0800
+++ incubator-brpc-0.9.5/src/CMakeLists.txt 2021-08-03 19:27:17.003700327 +0800
diff -urN brpc-0.9.5-origin/src/CMakeLists.txt brpc-0.9.5/src/CMakeLists.txt
--- brpc-0.9.5-origin/src/CMakeLists.txt 2018-10-30 12:00:24.000000000 +0800
+++ brpc-0.9.5/src/CMakeLists.txt 2021-08-03 19:27:17.003700327 +0800
@@ -47,11 +47,13 @@
target_link_libraries(protoc-gen-mcpack brpc-shared)

View File

@ -1,6 +1,6 @@
diff -rupN incubator-brpc-1.3.0.orig/src/bthread/task_group.cpp incubator-brpc-1.3.0/src/bthread/task_group.cpp
--- incubator-brpc-1.3.0.orig/src/bthread/task_group.cpp 2022-12-21 22:05:40.833683261 +0000
+++ incubator-brpc-1.3.0/src/bthread/task_group.cpp 2022-12-21 22:06:47.413173602 +0000
diff -rupN brpc-1.3.0.orig/src/bthread/task_group.cpp brpc-1.3.0/src/bthread/task_group.cpp
--- brpc-1.3.0.orig/src/bthread/task_group.cpp 2022-12-21 22:05:40.833683261 +0000
+++ brpc-1.3.0/src/bthread/task_group.cpp 2022-12-21 22:06:47.413173602 +0000
@@ -248,6 +248,9 @@ int TaskGroup::init(size_t runqueue_capa
return 0;
}

8
thirdparty/vars.sh vendored
View File

@ -183,10 +183,10 @@ LEVELDB_SOURCE=leveldb-1.20
LEVELDB_MD5SUM="298b5bddf12c675d6345784261302252"
# brpc
BRPC_DOWNLOAD="https://github.com/apache/incubator-brpc/archive/refs/tags/1.3.0.tar.gz"
BRPC_NAME=incubator-brpc-1.3.0.tar.gz
BRPC_SOURCE=incubator-brpc-1.3.0
BRPC_MD5SUM="ee5d00e203e9ef7b8dd25d0c882914c6"
BRPC_DOWNLOAD="https://github.com/apache/brpc/archive/refs/tags/1.3.0.tar.gz"
BRPC_NAME=brpc-1.3.0.tar.gz
BRPC_SOURCE=brpc-1.3.0
BRPC_MD5SUM="9470f1a77ec153e82cd8a25dc2148e47"
# rocksdb
ROCKSDB_DOWNLOAD="https://github.com/facebook/rocksdb/archive/refs/tags/v6.22.1.zip"