Eric Zhao
dae4621e6e
Refactor exit handler mechanism of Entry
- Rename: whenComplete -> whenTerminate
- Execute the exit handler directly after the onExit hook of all slots
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
55e038cc33
Polish CircuitBreaker interface and update comments
- Only carry context in tryPass/onComplete method (this might be generic in upcoming versions)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Jason Joo
ee2772b513
Fix the bug of circuit breaker half-open state transformation when request is blocked by upcoming rules ( #1645 )
* Refactor the workflow to fix the bug that circuit breaker may remain half-open state forever when the request is blocked by upcoming rules: revert the state change in exit handler (as a temporary workaround)
* Add exit handler in Entry as a per-invocation hook.
преди 4 години
M4Y
10c92e69a2
Optimize the order of slots in ProcessorSlot SPI config ( #1649 )
преди 4 години
Peine
c5da3faad9
Polish boolean checking in test cases and dashboard ( #1664 )
преди 4 години
Eric Zhao
a18ef7cbfa
Remove deprecated passCheck() in Rule and polish interface
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
07b811196b
Update test cases for circuit breaking
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
c0c27c86b7
Refactor degrade hierarchy with new circuit breaker mechanism and improve strategy
* Add `CircuitBreaker` abstraction (with half-open state) and add circuit breaker state change event observer support.
* Improve circuit breaking strategy (avg RT → slow request ratio) and make statistics of each rule dependent (to support arbitrary statistic interval).
* Add simple "trial" mechanism (aka. half-open).
* Refactor mechanism of metric recording and state change handling for circuit breakers: record RT and error when requests have completed (i.e. `onExit`, based on #1420 ).
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
ZhiQiang Gu
bd29e046e1
Add unit test for logging/TokenBucket ( #1504 )
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
преди 4 години
于玉桔
6b86721b36
Support setting class-level defaultFallback for annotation extension ( #1493 )
преди 4 години
ZhiQiang Gu
2e64d33085
test: Add test cases for Tuple2 ( #1501 )
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
преди 4 години
pleasecheckhere2016
5523fd0d42
Add exceptionPredicate in Tracer for customized exception filtering logic ( #1496 )
преди 4 години
Eric Zhao
99d4355318
Polish code comments of the fundamental Sph/SphO/SphU class
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
516e36fd83
Polish Tracer with entry.setError(ex) mechanism
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
7f3165740a
Refactor the mechanism of recording error in Entry and StatisticSlot
* Also polish related complete callbacks
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
7f0771df5c
Update resolving logic of project name and polish SentinelConfig ( #1437 )
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Lin.Liang
b716bed370
Support setting project.name via the properties file and deprecate legacy config path ( #1412 )
преди 4 години
johnli
5e9cfb0deb
fix: Tracer does not trace exception to DefaultNode ( #1068 )
преди 4 години
haifeng
04a1d065dd
Fix the bug of misplaced locks in ContextUtil and ClusterNode ( #1429 )
- which may lead to IllegalMonitorStateException in unlock() when unchecked error occurs during lock()
преди 4 години
Eric Zhao
a0196b6b00
Bump version to 1.8.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
6a7ec708bc
Bump version to 1.7.2
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
cdfive
e1435974c6
Set default log level of JDK logging to INFO and polish code of SpiLoader ( #1365 )
* Improve log info in SpiLoader, improve comment and test case
* Use error level in catch block, init ArrayList with capacity and improve add item to list
преди 4 години
Jason Joo
49e60a3e51
Force modifyRule command handler to fail if an incompatible old fastjson found ( #1377 )
* Note that this is only a temporary solution.
преди 4 години
cdfive
be4d058bf8
refactor: Make the ProcessorSlot itself as SPI and deprecate legacy slot chain builder ( #411 )
* Make slots loaded by SPI, mark all slots with @SpiOrder from -10000 to -1000, improve comment
* Reserve gateway and param slot chain builder (just extends DefaultSlotChainBuilder) and mark them as @Deprecated
преди 4 години
于玉桔
670b2cb764
Improve standard output message in LogBase ( #1357 )
преди 4 години
Eric Zhao
87f95adc2e
Fix timezone problem of sentinel-block.log
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
eed77cafc2
Polish placeholders in logging content to slf4j convention ( #1342 )
* Polish placeholders in logging content to "{}"
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
e4769293dc
Move CommandCenterLog to sentinel-transport-common and polish related code ( #1341 )
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
Eric Zhao
624d19d4ce
Polish logging SPI related code and add general JUL adapter for Logger SPI ( #1338 )
* Move the legacy JUL methods from LogBase to BaseJulLogger.
* Add a JavaLoggingAdapter as the general JUL adapter for the Logger SPI, which makes it convenient to use (as the default logger).
* Add LoggerSpiProvider to resolve Logger SPI.
* Polish the logback demo.
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 4 години
tianhao
6e0d116751
calculate process cpu usage to support application running in container environment
преди 5 години
xue8
5f203aa79f
Flexible loggers' support through SPI mechanism with name `com.alibaba.csp.sentinel.log.Logger` ( #1265 )
* There are two types of logger for command center and common modules specified by annotation of `LogTarget`
* Add implementing examples in `sentinel-demo/sentinel-demo-log-logback`
* All implementations should support placeholder '{}'
преди 4 години
cdfive
c1ff9135ee
Fix NPE in Tracer when context size exceeds the limit ( #1293 )
преди 4 години
Eric Zhao
87142ce512
Bump version to 1.7.2-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
9c909e3631
Bump version to 1.7.1
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
e9d730cc39
test: Fix unstable test cases in MetricExitCallbackTest
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
fangwentong
0e110c68ea
Fix the logic of getting maxSuccessQps in StatisticNode ( #1196 )
преди 5 години
Eric Zhao
a63c1841ee
Support setting config file path via system env and improve error handling in SentinelConfigLoader
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
c70565167f
refactor: Get the max allowed RT directly from SentinelConfig.statisticMaxRt() ( #1173 )
- to avoid the dependency chain: Constants -> SentinelConfig
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
于玉桔
24f8d75601
Fix the incorrect logic of handling the end separator of the log directory in LogBase ( #1172 )
преди 5 години
Eric Zhao
72a58f7ea7
Add Consumer functional interface in sentinel-core utils
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
9705f54611
Bump version to 1.7.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
8cdf1de854
Bump version to 1.7.0
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
6bb2de8750
Support classification for Sentinel resources
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
cf5b955f12
Improve AssertUtil for collection checking
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
74a40aa285
Improve Node and Metric interface to support conditional metric retrieval ( #1115 )
* Add detailsOnCondition method in Metric interface to filter MetricNode within the time condition.
* Add rawMetricsInMin method in Node interface, which will retrieve and generate metric items from the min-level sliding window on condition.
* Add test cases for detailsOnCondition.
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
b0905547ff
Use ServiceLoaderUtil to create SPI ServiceLoader
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
Eric Zhao
8d5654f727
Add ServiceLoaderUtil to improve SPI classloader mechanism and update SpiLoader
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
wangyb
dbf1f97dde
Fix the cluster rule checking logic in FlowRuleUtil#checkClusterField() ( #1105 )
преди 5 години
Eric Zhao
826447bc82
Fix the bug that resource name displayed in ClusterNode-related command APIs for SphU.entry(method) is incorrect ( #1078 )
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
преди 5 години
windWheel
4e55a6a749
Optimize the slot order in DefaultSlotChainBuilder ( #1056 )
преди 5 години