jason
73f166e258
Make ClusterNodeTest.testGetOrCreateOriginNodeMultiThread stable
před 5 roky
jason
16082a875c
Make WarmUpRateLimiterControllerTest stable
před 5 roky
Paul Kenneth Kent
4cc25429d3
Add unit tests for com.alibaba.csp.sentinel.util ( #651 )
* Add unit test for com.alibaba.csp.sentinel.util.IdUtil
* Add unit tests for com.alibaba.csp.sentinel.util.StringUtil
před 5 roky
Eric Zhao
0c3bf96678
Bump version to 1.6.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
48286e0ff8
Bump version to 1.5.1 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
d5204bb6a4
Ensure Error caught in InitExecutor and do not exit when error occurs in LogBase ( #613 )
to avoid affecting normal logic of users
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
61c525076f
Improve SentinelResourceAspect and update test cases / document of annotation support
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
beston123
6e1dfb374c
Add exceptionsToTrace configuration support in @SentinelResource annotation ( #543 )
před 5 roky
Eric Zhao
468327bdcd
Remove useless global NodeBuilder in Env class
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Carpenter Lee
7feaf709fc
Fix deadlock bug in Env static initialization ( #610 )
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
Bo Zhang
a3369378ad
Apply Alibaba p3c pmd plugin/rules and fix/ignore all violations of priority 1 ( #574 )
před 5 roky
Eric Zhao
0d4c47b23e
Bump version to 1.5.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
053f7172a3
Bump version to 1.5.0 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
1741da0bab
Automatically de-duplicate rules when loading rules ( #571 )
* De-duplicate rules automatically when loading rules
* Update rule managers
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
044cdbb1bf
Add occupy mechanism for future buckets of sliding window to support "prioritized requests final pass" ( #568 )
* Rename: MetricsLeapArray -> BucketLeapArray
* Add implementation for `FutureBucketLeapArray`, a kind of `BucketLeapArray` that only reserves for future buckets, which is used for calculating occupied future tokens.
* Add OccupiableBucketLeapArray that combines common BucketLeapArray with FutureBucketLeapArray. The rollingNumberInSecond in StatisticNode now uses OccupiableBucketLeapArray by default.
* Add OccupySupport interface. Node now implements OccupySupport interface.
* Add occupy-related methods in Metric and ArrayMetric.
* Handle prioritized requests in default traffic shaping controller.
* Update default occupyTimeout to 500ms
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
4b1ccd93e2
Refactor Node interface: change return type of `xxxQps` method from long to double ( #564 )
- Update test cases (use assertEquals(e, a, delta) instead)
- Also add `totalPass` method in Node interface
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Carpenter Lee
63d7c9d207
Revert "Add more overload methods in SphO and SphO" to avoid ambiguous method call
This reverts commit 35371c1
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
Carpenter Lee
35371c1a3c
Add more overload methods in SphO and SphO
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
Carpenter Lee
341b6426f0
Record total inbound traffic data in metric file ( #555 )
- Regard the total inbound as a "virtual node" with the name `__total_inbound_traffic__`
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
Eric Zhao
4073053b3a
Update javadoc for core classes
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
775484ba61
Add try-with-resources support for Entry class ( #550 )
- `Entry` class now implements `AutoCloseable` so it supports try-with-resources (`close` method adapts to `exit`)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
yikangfeng
9ec1985755
Fix SimpleDateFormat concurrent issue in CspFormatter of sentinel-core ( #548 )
před 5 roky
Carpenter Lee
5279895581
Add highestCpuUsage in system rule.
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
Eric Zhao
1ffce6b579
Fix test dependencies
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Jason Joo
5d3ccb0863
Solve the issue that sleeping-based tests are not stable and optimize slow tests ( #546 )
před 5 roky
ATAXGT
10d7c903cf
Optimize circuit breaking state transformation using CAS in DegradeRule ( #538 )
close → open: use `compareAndSet` to update for `cut` attribute (changed to an `AtomicBoolean`)
před 5 roky
Carpenter Lee
5d2170282f
Add Sph.entryWithPriority() method to receive args
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
mjaow
291742c171
Change default value of avgUsedTokens to zero to be more meaningful in DefaultController ( #460 )
před 5 roky
Eric Zhao
5b260a9f75
Bump version to 1.5.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
2e0fe23384
Bump version to 1.4.2 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
412e1ece47
Carry the triggered rule in subclasses of BlockException ( #469 )
* Extract getRule in BlockException and refine override methods in subclasses
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
mjaow
5c0fd5651a
Add volatile in double-checked locking field in ClusterBuilderSlot ( #466 )
před 5 roky
Eric Zhao
35537a691e
Refinement for test cases
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
cdfive
22e8d85a8f
Add some unit test for StatisticNode, ClusterNode and DefaultNodeBuilder class ( #423 )
před 5 roky
Andres Almiray
e893dd8c64
Make build faster by reducing fixed waiting time in tests ( #449 )
- Apply awaitility to core tests
- Cache maven local repo in Travis
před 5 roky
Eric Zhao
cd334406af
Code and javadoc refinement
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
luoxiangnan
f306a03090
HashMap init optimize when adding new ClusterNode to cluster node map ( #465 )
- reuse old map size to avoid rearrange and rehash the map
před 5 roky
mjaow
2cf6e29e72
Fix zero-count divide overflow bug in RateLimiterController ( #461 )
před 5 roky
mjaow
223ad252df
Remove duplicate comment in WarmUpController ( #464 )
před 5 roky
mjaow
30907e4c9d
Fix error value type and rename variable in EntranceNode class ( #457 )
před 5 roky
Eric Zhao
ba4fdcc638
Fixes #453 : Support tracing exception count for specific entry or context in Tracer
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
8e72211db9
Add catch throwable logic in ClusterStateManager to detect fatal error when loading SPI
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Carpenter Lee
c45d64c619
Bug fix: fix 420, fix negative waitTime in RateLimiterController and WarmUpRateLimiterController
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
před 5 roky
kexianjun
9697c06739
Fix incorrect comment in NodeSelectorSlot javadoc ( #419 )
před 5 roky
kangyl
47148acc1e
Remove redundant semicolon in MetricWriter ( #412 )
před 5 roky
Eric Zhao
d4d85dbc7c
Bump version to 1.4.2-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
225d81ed93
Bump version to 1.4.1
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
40368bdcd6
Config and log enhancement for cluster token client
- Refactor token client common config and assign config
- Log enhancement when transport to token server failed
- Add `getState` method to `ClusterTokenClient` interface
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
25e96a8cd3
Improve cluster state manager
- Support stop cluster mode (`NOT-STARTED` mode)
- Fix bug when updating cluster state via command API (should modify via state property)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky
Eric Zhao
99bdb9cf3c
Add total QPS limit control for specific namespace in cluster flow control ( #382 )
- Add `UnaryLeapArray` and `RequestLimiter` to enable simple QPS limit
- Improve cluster rule manager and server config manager to support request limiter
- Support `TOO_MANY_REQUEST` status in client side
- Also improve the automatic namespace register of embedded server mode
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
před 5 roky