apache / apache/brpc

开启 backup request 和 retry times 以及自定义 retry policy时会触发 CHECK_EQ 失败

Open
#2,001 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug (描述bug)**
当重试次数>=3时, 开启 backup request 以及 retry policy 时,
会触发 CHECK_EQ(current_id(), info.id) << "error_code=" << _error_code;

**To Reproduce (复现方法)**
1) 发送一次rpc: 记作 RPC_1. 假设在 backup request time 后返回, 且 retry policy 必定为真.
2) 触发 backup request, 记作 RPC_2. 且返回在 RPC_1 之后.
3) RPC_1 返回后, 重试时触发 CHECK_EQ(current_id(), info.id) << "error_code=" << _error_code;

**Expected behavior (期望行为)**
不触发 CHECK_EQ(current_id(), info.id) << "error_code=" << _error_code;

Contributor guide

Open the contributing guide

Research direction

Reproduce the described RPC_1/RPC_2 sequence with backup requests, at least three retries, and a custom retry policy. Trace the backup-request and retry handling around the CHECK_EQ(current_id(), info.id) assertion; done means this sequence no longer triggers the assertion and existing behavior remains covered by tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.