You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
FlowRule: rule1.setCount(2); rule1.setGrade(RuleConstant.FLOW_GRADE_THREAD);
同一个线程内三次 连续entry同一个资源,第三次entry的时候就会触发 限流异常。
看了下源码,FlowRule在做校验的时候使用了DefaultNode中的curThreadNum,每次entry的时候 会导致curThreadNum加1,第三次entry的时候 校验到curThreadNum为2,本次entry会违反限流规则就触发了限流。 但是并发线程不应该是看线程数量吗?
Beta Was this translation helpful? Give feedback.
All reactions