Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/urma-stability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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.

name: URMA stability
on:
pull_request:
paths:
- 'src/brpc/urma/**'
- 'src/brpc/urma_transport.*'
- 'test/brpc_urma*'
- 'test/CMakeLists.txt'
- 'tools/urma_stability.py'
- '.github/workflows/urma-stability.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
mock:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build libssl-dev libgflags-dev \
libprotobuf-dev protobuf-compiler libleveldb-dev libsnappy-dev \
zlib1g-dev libgtest-dev
- name: Build
run: |
cmake -S . -B build -G Ninja -DWITH_URMA=ON -DURMA_USE_MOCK=ON \
-DBUILD_UNIT_TESTS=ON -DDOWNLOAD_GTEST=OFF \
-DBRPC_SYSTEM_GTEST_SOURCE_DIR=/usr/src/googletest -DBUILD_BRPC_TOOLS=OFF
cmake --build build --target brpc_urma_unittest brpc_urma_stability_unittest -j2
- name: Run fault and data-path regressions
run: ctest --test-dir build -R '^(brpc_urma_unittest|brpc_urma_stability_unittest|urma_stability_.*)$' --output-on-failure
13 changes: 13 additions & 0 deletions docs/cn/urma.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,16 @@ UrmaTransport 推荐用于**大包和跨节点**高吞吐路径,而 UBRing
`ContextInitOrDie` 阶段拒绝。
- 硬件数据通路需要受支持的 UMDK provider 和 `liburma`。
- 当前实现面向 Linux。

## 稳定性测试

URMA mock 构建可运行故障注入和端到端测试:

```sh
ctest --test-dir build -R '^(brpc_urma_stability_unittest|urma_stability_.*)$' --output-on-failure
python3 tools/urma_stability.py build/test/brpc_urma_stability_unittest --connections 1024 --rounds 100
```

覆盖 credit/SQ 延迟、发送与接收重投失败、异常完成、断连、资源重建及注册池耗尽。
规模测试维持独立 URMA 连接,逐请求校验混合大小消息,依次运行事件、轮询和轮询内联配置。
使用真实 `liburma` 构建的测试程序可在硬件上运行同一规模测试,通过 `--device` 选择设备。
15 changes: 15 additions & 0 deletions docs/en/urma.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,18 @@ is tracked as a future enhancement.
rejected at `ContextInitOrDie`.
- A hardware data path requires a supported UMDK provider and `liburma`.
- The current implementation targets Linux.

## Stability tests

Run fault injection and end-to-end tests with a URMA mock build:

```sh
ctest --test-dir build -R '^(brpc_urma_stability_unittest|urma_stability_.*)$' --output-on-failure
python3 tools/urma_stability.py build/test/brpc_urma_stability_unittest --connections 1024 --rounds 100
```

Coverage includes credit/SQ delays, failed sends and receive reposts, completion errors,
disconnects, resource recreation and registered-pool exhaustion. The scale test maintains
independent URMA connections and checks each mixed-size response in event, polling and
inline polling modes. A test binary linked with real `liburma` runs the same scale test
on hardware; use `--device` to select a device.
Loading
Loading