sentinel-golang icon indicating copy to clipboard operation
sentinel-golang copied to clipboard

[BUG] should we set resource state to closed when circuit breaker rules are deleted?

Open sysulq opened this issue 4 years ago • 2 comments

Issue Description

Type: bug report

Describe what happened

When the circuit breaker rules are cleared, no callbacks from OnTransformToClosed to tell us the state of resource is closed

Describe what you expected to happen

We expect the state of resource deleted should be closed...

How to reproduce it (as minimally and precisely as possible)

  1. Load rules and trigger to open
  2. clear rules
  3. no callbacks from OnTransformToClosed

Tell us your environment

Anything else we need to know?

sysulq avatar Nov 05 '21 10:11 sysulq

How to clean up the rules? Did you delete the rules file or did you empty the contents of the rules file?

binbin0325 avatar Nov 05 '21 14:11 binbin0325

LoadRules(nil)

sysulq avatar Nov 05 '21 15:11 sysulq