Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
159c855
Fix RDMA PollCq missing recv CQEs after re-arming the CQs (#3425)
chenBright Aug 7, 2026
0c8aede
Fix rdma handshake failing the socket instead of falling back to TCP …
chenBright Aug 7, 2026
0ec3a9d
Refactor streaming rpc (#3422)
chenBright Aug 9, 2026
7a3e034
Fix brpc_proto_library failure when brpc is used as an external Bazel…
chenBright Aug 9, 2026
cb84e83
fix rpcz root client span lifetime (#3420) (#3421)
lh2debug-2 Aug 9, 2026
ce0eaec
Merge pull request #3429 from wasphin/feature/protobuf-35
wasphin Aug 9, 2026
febb014
Signal workers for priority tasks (#3423)
chenBright Aug 10, 2026
1175311
test: wait for submitted spans to be collected (#3448)
ZhengweiZhu Aug 15, 2026
58ad904
build: complete UBRING Bazel and CI support (#3445)
ZhengweiZhu Aug 15, 2026
04d0bf0
fix(test): avoid overriding the configured C++ standard (#3446)
zchuango Aug 15, 2026
5a80007
Replace NULL with nullptr in butil/debug (#3438)
chenBright Aug 15, 2026
bd6fa80
Replace NULL with nullptr in butil/details, butil/mac, butil/synchron…
chenBright Aug 15, 2026
950cf26
Refactor NULL with nullptr in butil/files (#3440)
chenBright Aug 15, 2026
a22d305
Refactor NULL with nullptr in butil/memory (#3441)
chenBright Aug 15, 2026
9f9b62f
Refactor NULL with nullptr in butil/strings (#3442)
chenBright Aug 15, 2026
a2a43d9
Refactor NULL with nullptr in butil/threading (#3443)
chenBright Aug 15, 2026
3124cf0
Replace NULL with nullptr in butil/containers (#3437)
chenBright Aug 15, 2026
24146ca
cap simple string length in RedisReply::ConsumePartialIOBuf (#3404)
ubeddulla Aug 15, 2026
e0abb10
Progressive timeout dev (#3409)
zchuango Aug 15, 2026
437a7b7
Limit mcpack2pb array item count to the actual payload size (#3451)
wwbmmm Aug 15, 2026
ca370c2
Fix RTMP abort message deleting the chunk stream being parsed (#3452)
wwbmmm Aug 15, 2026
552bfd6
Fix SOFA PBRPC parser not limiting metadata size (#3449)
wwbmmm Aug 15, 2026
48db968
Refactor NULL with nullptr in butil (#3444)
chenBright Aug 16, 2026
9aa41f7
Support flow-controlled gRPC client requests (#3430)
wasphin Aug 16, 2026
137c1ca
Revert "Progressive timeout dev (#3409)" (#3453)
wwbmmm Aug 16, 2026
7f64663
Fix WeightedRandomizedLoadBalancer skipping the last server (#3426)
Nas01010101 Aug 16, 2026
96ce9f1
Fix bug when parsing zero-length string field in mcpack2pb (#3450)
wwbmmm Aug 16, 2026
7f8120a
Refactor NULL with nullptr in brpc/details (#3457)
chenBright Aug 18, 2026
f0f72fd
Refactor NULL with nullptr in json2pb (#3455)
chenBright Aug 18, 2026
3188cb5
Refactor NULL with nullptr in brpc/builtin (#3456)
chenBright Aug 18, 2026
64120a3
Refactor NULL with nullptr in brpc/ubshm (#3460)
chenBright Aug 18, 2026
11f8192
Refactor NULL with nullptr in brpc/rdma (#3459)
chenBright Aug 18, 2026
3366074
Refactor NULL with nullptr in brpc/policy (#3458)
chenBright Aug 18, 2026
5205a9e
Add URMA transport support
zchuango Aug 5, 2026
5d7edc4
fix: address review comments on naming, IOBuf sizing and UMDK pinning
cw20050111-prog Aug 12, 2026
617e6d6
docs(urma): add Bazel build section and document its limitations
cw20050111-prog Aug 14, 2026
52abfc0
fix(bazel): add missing package marker for umdk third-party build file
cw20050111-prog Aug 14, 2026
6d70397
fix(bazel): strip upstream src/urma/BUILD.bazel so umdk headers glob …
cw20050111-prog Aug 14, 2026
917c11d
fix(urma): require explicit opt-in for the URMA link-time mock
cw20050111-prog Aug 17, 2026
e32985a
Link liburma for all examples
cw20050111-prog Aug 18, 2026
947df20
Drop duplicate liburma lookup in urma_performance
cw20050111-prog Aug 18, 2026
069df85
Add comment about linking liburma in BrpcExample.cmake
cw20050111-prog Aug 18, 2026
eda12bc
Revert liburma linking for diagnosis
cw20050111-prog Aug 18, 2026
fb3b3c9
Check for URMA library and update build configuration
cw20050111-prog Aug 18, 2026
3e36620
Add URMA library search to CMake configuration
cw20050111-prog Aug 18, 2026
78f8b08
Update CMake to link with URMA library conditionally
cw20050111-prog Aug 18, 2026
cbbf495
Remove URMA library check from CMakeLists.txt
cw20050111-prog Aug 18, 2026
7949cea
Refactor URMA library linking logic in CMake
cw20050111-prog Aug 18, 2026
a65292f
Merge remote-tracking branch 'linquickdev/urma_transport' into urma_t…
cw20050111-prog Aug 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
./example/build_with_bazel
./example/build_with_bazel_module
./example/build_with_old_bazel

# `registry/` is brpc's self-maintained Bzlmod registry. Its overlay
# BUILD.bazel files reference sources from the libunwind tarball that is
Expand Down
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ build:macos-asan --copt -D_FORTIFY_SOURCE=0
build:macos-asan --dynamic_mode=off

test:asan --test_env=ASAN_OPTIONS=detect_leaks=0:detect_stack_use_after_return=1

build:ubring --define BRPC_WITH_UBRING=true
67 changes: 55 additions & 12 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run: |
export CC=gcc && export CXX=g++
mkdir gcc_build_all && cd gcc_build_all
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON \
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_UBRING=ON \
-DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -DWITH_BTHREAD_TRACER=ON \
-DWITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
make -j ${{env.proc_num}} && make clean
Expand Down Expand Up @@ -123,24 +123,44 @@ jobs:
# real server (e.g. brpc_redis_unittest) actually run under bazel instead
# of skipping. Same shared action the make-based unittest jobs use.
- uses: ./.github/actions/install-essential-dependencies
- run: bazel test //test/...
- run: bazel test --config=rdma --config=ubring //test/...

gcc-compile-with-bazel-all-options:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- run: |
- run: sudo apt-get update && sudo apt-get install -y libibverbs-dev
- name: root
run: |
bazel build --define with_mesalink=false \
--define with_glog=true \
--define with_thrift=true \
--define BRPC_WITH_RDMA=true \
--define BRPC_WITH_UBRING=true \
--define BRPC_WITH_BORINGSSL=true \
--define with_debug_bthread_sche_safety=true \
--define with_debug_lock=true \
--define with_asan=true \
--define with_bthread_tracer=true \
--define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \
--define with_babylon_counter=true \
-- //:brpc //example/...
- name: external
run: |
cd example/build_with_bazel_module
bazel build --define with_mesalink=false \
--define with_glog=true \
--define with_thrift=true \
--define BRPC_WITH_RDMA=true \
--define BRPC_WITH_UBRING=true \
--define BRPC_WITH_BORINGSSL=true \
--define with_debug_bthread_sche_safety=true \
--define with_debug_lock=true \
--define with_asan=true \
--define with_bthread_tracer=true \
--define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \
--define with_babylon_counter=true \
-- //:brpc
-- //...

clang-compile-with-make-protobuf:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -182,25 +202,48 @@ jobs:
- run: |
bazel test --test_output=streamed \
--action_env=CC=clang \
--config=rdma \
--config=ubring \
//test/...

clang-compile-with-bazel-all-options:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- run: |
- run: sudo apt-get update && sudo apt-get install -y libibverbs-dev
- name: root
run: |
bazel build --action_env=CC=clang \
--define with_mesalink=false \
--define with_glog=true \
--define with_thrift=true \
--define BRPC_WITH_RDMA=true \
--define BRPC_WITH_UBRING=true \
--define BRPC_WITH_BORINGSSL=true \
--define with_debug_bthread_sche_safety=true \
--define with_debug_lock=true \
--define with_asan=true \
--define with_bthread_tracer=true \
--define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \
--define with_babylon_counter=true \
-- //:brpc //example/...
- name: external
run: |
cd example/build_with_bazel_module
bazel build --action_env=CC=clang \
--define with_mesalink=false \
--define with_glog=true \
--define with_thrift=true \
--define BRPC_WITH_RDMA=true \
--define BRPC_WITH_UBRING=true \
--define BRPC_WITH_BORINGSSL=true \
--define with_debug_bthread_sche_safety=true \
--define with_debug_lock=true \
--define with_asan=true \
--define with_bthread_tracer=true \
--define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \
--define with_babylon_counter=true \
-- //:brpc
-- //...

clang-unittest:
runs-on: ubuntu-22.04
Expand All @@ -209,7 +252,7 @@ jobs:
- uses: ./.github/actions/install-essential-dependencies
- uses: ./.github/actions/init-ut-make-config
with:
options: --with-bthread-tracer
options: --with-bthread-tracer --with-rdma
- name: compile tests
run: |
cat config.mk
Expand Down Expand Up @@ -245,10 +288,10 @@ jobs:
clang-unittest-bazel-with-babylon-and-new-pb:
runs-on: ubuntu-22.04
env:
TEST_PROTOBUF_VERSION: "34.1"
# protobuf >= 34.x uses new ProtoInfo fields (option_deps,
# extension_declarations) introduced in Bazel 8.x. The repo's
# .bazelversion (7.2.1) is too old. bazelisk honors USE_BAZEL_VERSION.
TEST_PROTOBUF_VERSION: "35.1"
# protobuf >= 34.x uses new ProtoInfo fields (option_deps, extension_declarations)
# introduced in Bazel 8.x. The repo's .bazelversion (7.2.1) is too old. bazelisk
# honors USE_BAZEL_VERSION.
USE_BAZEL_VERSION: "8.3.1"
steps:
- uses: actions/checkout@v2
Expand All @@ -263,7 +306,7 @@ jobs:
grep -qE "bazel_dep\(name = ['\"]protobuf['\"], version = ['\"]${TEST_PROTOBUF_VERSION}['\"]" MODULE.bazel \
|| { echo "ERROR: failed to override protobuf version in MODULE.bazel to ${TEST_PROTOBUF_VERSION}"; exit 1; }
- run: |
bazel test --action_env=CC=clang --config=rdma \
bazel test --action_env=CC=clang --config=rdma --config=ubring \
--define with_bthread_tracer=true \
--define with_babylon_counter=true \
//test/...
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ header:
- 'example/*/*.json'
- 'example/*/*.pem'
- 'example/*/*.port'
- 'example/build_with_bazel_module/.bazelversion'
- 'src/bthread/offset_inl.list'
- 'test/*.crt'
- 'test/*.key'
Expand Down
3 changes: 3 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ DEFINES = [
}) + select({
"//bazel/config:brpc_with_rdma": ["BRPC_WITH_RDMA=1"],
"//conditions:default": [],
}) + select({
"//bazel/config:brpc_with_ubring": ["BRPC_WITH_UBRING=1"],
"//conditions:default": [],
}) + select({
"//bazel/config:brpc_with_urma": ["BRPC_WITH_URMA=1"],
"//conditions:default": [],
Expand Down
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ option(WITH_URMA "With URMA (openEuler Unified Remote Memory Access)" OFF)
option(DOWNLOAD_URMA_HEADERS
"Download UMDK headers when WITH_URMA is enabled and headers are absent"
ON)
option(WITH_URMA_MOCK
"Explicitly allow linking brpc's URMA link-time mock when liburma is not found (WITH_URMA only). The mock cannot talk to real URMA hardware, so this must be opted into rather than silently substituted."
OFF)
option(WITH_UBRING "With UB" OFF)
option(WITH_DEBUG_BTHREAD_SCHE_SAFETY "With debugging bthread sche safety" OFF)
option(WITH_DEBUG_LOCK "With debugging lock" OFF)
Expand Down Expand Up @@ -371,10 +374,17 @@ if(WITH_URMA)
if(URMA_LIB)
message(STATUS "Found URMA library: ${URMA_LIB}")
set(URMA_USE_MOCK 0)
else()
elseif(WITH_URMA_MOCK)
message(STATUS
"liburma not found; building with the URMA link-time mock")
"liburma not found; WITH_URMA_MOCK=ON, building with the URMA "
"link-time mock")
set(URMA_USE_MOCK 1)
else()
message(FATAL_ERROR
"Fail to find liburma. Install liburma, set URMA_ROOT, or "
"explicitly opt into brpc's link-time mock with "
"-DWITH_URMA_MOCK=ON (the mock cannot talk to real URMA "
"hardware; only enable it for CI/tests without URMA hardware).")
endif()
endif()

Expand Down
28 changes: 26 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

module(
name = 'brpc',
version = '1.17.0',
Expand All @@ -10,11 +27,10 @@ bazel_dep(name = 'bazel_skylib', version = '1.0.3')
bazel_dep(name = 'boringssl', version = '0.0.0-20211025-d4f1ab9')
bazel_dep(name = 'protobuf', version = '27.3', repo_name = 'com_google_protobuf')
bazel_dep(name = 'gflags', version = '2.2.2', repo_name = 'com_github_gflags_gflags')
bazel_dep(name = 'glog', version = '0.5.0', repo_name = 'com_github_google_glog')
bazel_dep(name = 'glog', version = '0.7.1', repo_name = 'com_github_google_glog')
bazel_dep(name = 'platforms', version = '0.0.4')
bazel_dep(name = "apple_support", version = "1.22.1")
bazel_dep(name = 'rules_cc', version = '0.0.1')
bazel_dep(name = 'rules_proto', version = '4.0.0')
bazel_dep(name = 'zlib', version = '1.3.1.bcr.5', repo_name = 'com_github_madler_zlib')
bazel_dep(name = 'babylon', version = '1.4.4')
# --registry=https://raw.githubusercontent.com/apache/brpc/master/registry
Expand Down Expand Up @@ -62,4 +78,12 @@ git_repository(
build_file = '//bazel/third_party/umdk:umdk.BUILD',
remote = 'https://atomgit.com/openeuler/umdk.git',
commit = '564ee727a55523d4351a8fb3c94292b388ebb924', # v26.06.0_CAM
# umdk ships its own src/urma/BUILD.bazel, which turns src/urma into a
# separate Bazel package and silently empties the glob() in umdk.BUILD
# (glob cannot cross package boundaries). Drop it so the headers under
# src/urma/lib/urma/**/include stay part of this repository's root
# package.
patch_cmds = [
'rm -f src/urma/BUILD.bazel',
],
)
8 changes: 8 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ git_repository(
build_file = "//bazel/third_party/umdk:umdk.BUILD",
remote = "https://atomgit.com/openeuler/umdk.git",
commit = "564ee727a55523d4351a8fb3c94292b388ebb924", # v26.06.0_CAM
# umdk ships its own src/urma/BUILD.bazel, which turns src/urma into a
# separate Bazel package and silently empties the glob() in umdk.BUILD
# (glob cannot cross package boundaries). Drop it so the headers under
# src/urma/lib/urma/**/include stay part of this repository's root
# package.
patch_cmds = [
"rm -f src/urma/BUILD.bazel",
],
)

# Header-only JSON library used by iobuf_unittest's IOBuf<->std::iostream
Expand Down
6 changes: 6 additions & 0 deletions bazel/config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@ config_setting(
define_values = {"with_babylon_counter": "true"},
visibility = ["//visibility:public"],
)

config_setting(
name = "brpc_with_ubring",
define_values = {"BRPC_WITH_UBRING": "true"},
visibility = ["//visibility:public"],
)
17 changes: 17 additions & 0 deletions bazel/third_party/umdk/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Thie empty BUILD.bazel file is required to make Bazel treat
# this directory as a package.
20 changes: 8 additions & 12 deletions bazel/tools/brpc_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,13 @@ def brpc_proto_library(
include: protoc `-I` root AND the resulting cc_library `includes`
root, relative to the current package.
When omitted, "" or None, the include root is the
current package itself (suitable for .proto files
sitting directly under the package root, as in `test/`
and `example/...`). The root `BUILD.bazel` of brpc must
pass `"src"` so that code can reference the protos as
`import "brpc/foo.proto"`.
current package itself.
proto_deps: list of native `proto_library` dependencies
(well-known protos or external .proto libraries).
Defaults to
`["@com_google_protobuf//:descriptor_proto"]`.
Pass `[]` explicitly to disable the default; pass
None (the default) to use it.
Pass `[]` explicitly to disable the default.
Pass None (the default) to use it.
visibility: same semantics as cc_library.
testonly: same semantics as cc_library.
"""
Expand Down Expand Up @@ -127,11 +123,11 @@ def brpc_proto_library(
# cc_library `includes` is required, otherwise the .pb.cc
# files inside this cc_library cannot find the .pb.h headers
# they just generated (the headers live under
# bazel-bin/<package>/<include>/...). When include="" we pass
# "." to mean "the current package itself"; Bazel then exposes
# both `-I <package>` and `-I bazel-bin/<package>`
# automatically to dependents.
includes = [real_include if real_include else "."],
# bazel-bin/<package>/<include>/...). For a non-root package
# with include="", "." exposes the current package's source
# and bazel-bin directories. The root package needs no extra
# include because those roots are already on the search path.
includes = [real_include] if real_include else (["."] if native.package_name() else []),
deps = deps + ["@com_google_protobuf//:protobuf"],
visibility = visibility,
testonly = testonly,
Expand Down
Loading
Loading