apache / apache/servicecomb-java-chassis
ProviderQpsFlowControlHandler不被执行的问题
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
当请求走到doInvoke时

由于在外部进行了++,导致handlerIndex已经是1了

此时放在handlerList中的首个是ProviderQpsFlowControlHandler

它的首行会判断invocation的hanlerIndex是否大于0,由于handlerIndex++放在入口前,且handlerIndex不能赋值初始值为-1,也没有其他途径修改值,所以进来这里的代码一定是大于0的,导致ProviderQpsFlowControlHandler可能永远不被执行

我在走读代码的时候看到了这么个情况,绞尽脑子没有想到缘由,可能不是bug,而是有什么其他设计,希望能够得到解答,万分感谢!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at doInvoke and trace how invocation.handlerIndex changes before ProviderQpsFlowControlHandler is reached. Read the handlerList ordering and the handler's initial handlerIndex check, then confirm whether the handler is skipped in this path. Done means documenting the intended design or producing a focused fix with evidence that the handler executes correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100