Comments (2)
And here is the log,
testParamFlowDefaultCheckSingleValueCheckQpsMultipleThreads: sleep for 3 seconds
189:passDefaultLocalCheck:2024-03-28T17:08:36.698,currentTime:1711645716698,passTime:3014,oldQps:4
200:passDefaultLocalCheck:2024-03-28T17:08:36.699,currentTime:1711645716698
200:passDefaultLocalCheck:2024-03-28T17:08:36.699,currentTime:1711645716698
200:passDefaultLocalCheck:2024-03-28T17:08:36.699,currentTime:1711645716699
200:passDefaultLocalCheck:2024-03-28T17:08:36.699,currentTime:1711645716699
200:passDefaultLocalCheck:2024-03-28T17:08:36.699,currentTime:1711645716699
200:passDefaultLocalCheck:2024-03-28T17:08:36.7,currentTime:1711645716699
189:passDefaultLocalCheck:2024-03-28T17:08:36.699,currentTime:1711645716698,passTime:3014,oldQps:0
[ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.613 s <<< FAILURE! -- in com.alibaba.csp.sentinel.slots.block.flow.param.
[ERROR] com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowDefaultCheckerTest.testParamFlowDefaultCheckSingleValueCheckQpsMultipleThreads -- LURE!
java.lang.AssertionError: expected:<5> but was:<8>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowDefaultCheckerTest.testParamFlowDefaultCheckSingleValueCheckQpsMultipleThreadsjava:320)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
from sentinel.
This is a typical ABA Problem. And on passDefaultLocalCheck, we maintain two variables status and keep them in sync(restQps&lastAddTokenTime).
With this background, we could introduce TokenUpdateStatus
, to record restQps&lastAddTokenTime, and update in atomic way..
from sentinel.
Related Issues (20)
- Incorrectly described in the official document 官网文档描述有误 HOT 2
- [BUG] ParamFlowRuleManager的getRulesOfResource会有空指针异常 HOT 1
- 请问你们的集群模式的文档是给人看的吗,感觉讲一半,配置给一半?能不能给一个直接能配置出一个集群模式的文档?
- DefaultCircuitBreakerRuleManager在1.8.8已经可用了吗 HOT 1
- Persistence of gateway mode flow control rules in the Sentinel dashboard
- [BUG] 熔断规则中编辑页面没有正确显示设置的统计时长 HOT 1
- sentinel 好像不支持reactor 3.5.0 以上的版本,后续有升级计划么
- How to use it in scenarios where resource names are not fixed HOT 1
- 新功能==》持久化保存做的不好用,能不能在sentinel面板中做个一键保存功能,弹窗让他选择nacos,consul。。。 HOT 3
- 请问sentinel2.x出release版本了吗? HOT 2
- [BUG] 流控规则,配置集群单机均摊和集群总体一个线程和单机一个线程没区别,都是支持三个并发线程;不支持仅一个线程的需求
- 集群限流不生效,tokenserver和tokenclient均正常,tokenclient端无sentinel-cluster-client.log日志 HOT 1
- 有计划支持spring cloud gateway mvc模式吗
- Spring Cloud Gateway 升级Sentinel版本后,一个资源配置了多条规则,其中一条规则触发熔断抛出异常后没有退出规则链,还会继续触发剩余的规则
- 增加了sentinel-prometheus相关依赖,但是9092端口无法被监听,配置设置csp.sentinel.prometheus.fetch.port=9093也无效 HOT 1
- [BUG] csp.sentinel.log.dir参数对sentinel-dashboard无效 HOT 1
- 热点参数并发数限流[BUG]
- sentinel 控制台编辑流控规则,将QPS切换为并发线程数,流控效果保持不变[BUG]
- springboot 2.X已经停更了 目前已经出现了很多CVE问题 希望可以将server服务升级到boot3.X版本并支持一下虚拟线程 这样性能肯定会提高一些 安全性也有保障
- 【疑问】Spring Cloud Gateway适配是否支持多实例网关的限流?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentinel.