alibaba / alibaba/Sentinel

[bug report]When have duplicate degrade rules for same resource, sentinel degrade may not work correct(no retry with high probability)

Open
#2,136 2 comments 0 reactions 0 assignees View on GitHub
area/circuit-breaking
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

bug report

### Describe what happened (or what feature you want)
when we happen to load two same duplicate degrade rule for one resource(DegradeRuleManager.loadRules), we find that degrade is very likely to be OPEN for ever, can not trigger retry

### Describe what you expected to happen
retry mechanism works correctly as there is a Half Open state, and can see a retry request every 10 seconds(default)

### How to reproduce it (as minimally and precisely as possible)
1. pls load two duplicate rule for one resource, say 50% request exceed 50ms trigger degrade
2. do performance test, and inject delay 100ms
3. check the log, and see no retry (with high probability, not definitely)

### Tell us your environment
can easily be reproduced(with high probability)

### Anything else we need to know?
may be related with this issue: https://github.com/alibaba/Sentinel/issues/1638
See AbstractCircuitBreaker.fromOpenToHalfOpen, has somethig to do with this?

Contributor guide

Open the contributing guide

Research direction

Start with DegradeRuleManager.loadRules and AbstractCircuitBreaker.fromOpenToHalfOpen, then reproduce the issue with duplicate rules for one resource, 50% requests exceeding 50 ms, and an injected 100 ms delay. Check the logs for the expected retry request every 10 seconds; done means the circuit reaches Half Open and retry works correctly instead of remaining OPEN.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.