Commit Graph

319 Commits

Author SHA1 Message Date
gaoyf e60f0d0eee
feat: skip regex resource matching when exact match exists (default disabled, configurable)(#3565)
* Simple rules should have higher priority than regular expression rules

* Add optional switch to skip regex matching when simple rules already match, default: false, keeps backward compatibility.

* fix RuleManagerTest unit test failure
2025-11-03 17:57:14 +08:00
LearningGp eb3a9b099a
Bump version to 1.8.9 (#3566)
* chore: update release configuration

* Bump version to 1.8.9
2025-10-16 20:26:58 +08:00
XenoAmess 7e17ae7c0d
chore: refine pom (#3560) 2025-09-30 15:08:50 +08:00
manojks1999 4a419818af
perf: improved Date formatter (#3466)
* Improved Date formatter

* change in naming conv

* change in datetime format

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-16 09:42:41 +08:00
Heramb Joshi d9398b4f75
chore(test): fixed offset syntax by using a correct method. (#3459) 2025-09-15 19:34:41 +08:00
LearningGp 3892514c53 Bump version to 1.8.8 2024-06-04 16:05:34 +08:00
cdfive dbd3c06ca7
Fix when duplication spi class found using SpiLoader (#3387) 2024-04-28 09:53:01 +08:00
Robert Lu befdc56885
fix flaky tests (#3364)
* fix ParamFlowPartialIntegrationTest

mock TimeUtil to avoid time changed, and bucket moved to next.

* remove csp.sentinel.log.output.type

remove sysprop csp.sentinel.log.output.type in TimeUtilTest,
to avoid a few outputs.

* try fix testConcurrentAcquireAndRelease

* remove stdout

remove sout in ParamFlowThrottleRateLimitingCheckerTest,
to avoid a few outputs.

* ConcurrentClusterFlowCheckerTest,djust the flowId to prevent conflicts

* CurrentConcurrencyManagerTest,adjust the flowId to prevent conflicts

* update year
2024-03-25 10:09:16 +08:00
袁世超 24c93c8a1a
replace ThreadLocal<DateFormat> with DateTimeFormatter (#3353) 2024-03-21 13:41:11 +08:00
Robert Lu 8fef1b5eee
Support jdk17 (#3339)
Adjust the test logic, use jdk17 to build, 8, 11, 17 to run
2024-02-20 18:58:52 +08:00
LearningGp f3fd4e6187 Bump version to 1.8.7 2023-12-28 19:32:10 +08:00
LearningGp 665fb541a7 Bump version to 1.8.7-SNAPSHOT 2023-12-28 17:48:44 +08:00
quguai c4ed9a3aba Resource rules (flow/degrade/param/authority) support regex matching (#3251) 2023-12-27 20:44:06 +08:00
Robert Lu 94f92ea635 make all ThreadPool static final (#3243)
* make all ThreadPool static final

* update github workflow
2023-12-27 20:40:27 +08:00
karl-sy ae42ddd35f Make default JUL-based logging asynchronous (#3136)
* fix issues/1463 : Make default JUL-based logging asynchronous
2023-12-27 20:40:27 +08:00
quguai c4997eee15 Remove the requirement of carrying batchCount and args in entry.exit() (#3114) 2023-12-27 20:40:27 +08:00
LearningGp 0c97d8f4b1 Add basic implementation of token bucket for flow-control (#3106) 2023-12-27 20:40:27 +08:00
Joseph Zhang 9f3712eed7 Fix NPE bug in LogSlot#entry when recording rule ID (#2980) 2023-12-27 20:40:26 +08:00
Eric Zhao e34d55273f Refactor RateLimiterController: improve accuracy and support maxQps > 1000
* Rename to ThrottlingController
* Improve accuracy: use nanoseconds when necessary and support maxQps threshold > 1000 (i.e. wait < 1ms)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2023-12-27 20:40:26 +08:00
Eric Zhao 4e41c14514 Polish AssertUtil: add assertNotNull and assertTrue
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2023-12-27 20:40:26 +08:00
小贼贼子 3c9dba3eba Fix spelling typo in code (#2948) 2023-12-27 20:40:26 +08:00
Eric Zhao 19418e71ad Refactor and refine implementation of default circuit breaker rule
* Rename: DefaultDegradeSlot -> DefaultCircuitBreakerSlot
* Refine DefaultCircuitBreakerRuleManager
* Add test cases

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2023-12-27 20:40:26 +08:00
wuwen 8b43caede4 Add default circuit breaker rule support (#2232) 2023-12-27 20:40:26 +08:00
Eric Zhao dd1ba2725e Bump version to 1.8.6
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2022-10-25 16:57:18 +08:00
hongpy 5864ab577f
Fix the bug that SpiLoader#closeResources may not record the exception when error occurs (#2890) 2022-10-09 11:04:57 +08:00
Eric Zhao 84df19b2c5 Bump version to 1.8.6-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2022-09-15 09:50:36 +08:00
ZhongJinHacker b9dd399697
Fix incorrect code description in sliding window logic of LeapArray (#2876)
* The "clean" logic has been removed in earlier version
2022-09-15 09:40:37 +08:00
Ze 9ac8e89dc4
Removing unnecessary checks in SystemRuleManager#checkSystem (#2869) 2022-09-15 09:33:56 +08:00
一个不知名的Java靓仔 6c74a4cf70
Add id field in Rule entity and record ruleId in block log (#2853)
* Add id field (Long) in Rule
* optimize BlockException log
2022-08-31 10:32:33 +08:00
Eric Zhao 24ac1be442 Bump version to 1.8.5 and update README.md
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2022-08-08 21:29:40 +08:00
Eric Zhao 9b7786259e Bump version to 1.8.5-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2022-08-08 09:52:51 +08:00
Eric Zhao 16e1bb8fe8 Bump version to 1.8.4
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2022-04-12 10:14:53 +08:00
zhuyou1234 679625e299 Improve AuthorityRuleManager: replace the rule map instead of clear-then-insert when updating rules (#2655) 2022-04-06 14:45:18 +08:00
David Huang 2cb9747e56
doc: Improve javadoc for DegradeRule and dashboard ApiPredicateItemVo (#2614) 2022-03-23 21:15:36 +08:00
zhaoxinhu 794530f533
Add log level configuration support for common logs (#2514)
* Add `csp.sentinel.log.level` property to support logging level for record logs (not for block log and metric log)
2022-01-14 17:22:01 +08:00
howiekang 6f555d7c96
Fix param args missing bug in fireExit of StatisticSlot (#2523) 2022-01-05 11:51:21 +08:00
howiekang 02cfe40f8a
Fix DynamicSentinelProperty synchronized listener set iterator race-condition problem (#2519) 2022-01-01 11:06:16 +08:00
Eric Zhao 8724a7c0a1 Bump version to 1.8.4-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2022-01-01 11:00:04 +08:00
Eric Zhao 6135ff290a Bump version to 1.8.3
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2021-12-31 14:46:52 +08:00
Eric Zhao 51b21921f5 Bump version to 1.8.3-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2021-12-22 14:48:43 +08:00
wucheng1997 3e9f42efce
Fix QPS mode of system rule: use passQps instead of successQps and support batchCount (#2455) 2021-11-23 10:16:47 +08:00
brotherlu-xcq 25651de09a
Add metric exporter extension for exporting Sentinel metrics via JMX (#2275)
* Expose the MetricItem AS MBean
2021-09-15 10:03:09 +08:00
xiaojun207 38e0306f95
Remove unused code regarding sun.misc.Unsafe in util classes (#2285) 2021-07-09 23:30:54 +08:00
Eric Zhao 4498de480f Bump version to 1.8.2
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2021-07-05 19:59:44 +08:00
Jason Joo 0b5f6196e5 Improve performance of TimeUtil adaptively in different load conditions (#1746)
To achieve this by making TimeUtil have multiple running states:

- IDLE: Direct invocation state for idle conditions.
- RUNNING: Legacy mode for busy conditions.
- REQUEST: Temporary state from IDLE to RUNNING.

Through this design, TimeUtil won't cost much in idle systems anymore.

Signed-off-by: Jason Joo <hblzxsj@163.com>
2021-06-29 17:08:14 +08:00
SparkLee f395daf037
doc: Fix typo in comments of SphO (#2206) 2021-05-17 09:51:26 +08:00
张志勇 0d22aca591
Support config from system env in SentinelConfig and polish TransportConfig (#2154)
- An improved method for obtaining IP address and port number from containers
2021-04-27 19:42:22 +08:00
Jerry Chin 36b162cc70 Apply volatile modifier for fields in FlowRuleManager while keep concurrency semantics intact (#2107)
- Revert #1783
2021-04-27 19:38:02 +08:00
drgnchan 2f90a87cab
feat: Fix typo in FlowRuleManager and improve code with Map.computeIfAbsent in MetricTimerListener (#2110) 2021-04-07 13:43:27 +08:00
Yanming Zhou df871b0350
Simplify enums: reuse enum name and remove unnecessary code (#2032) 2021-03-04 11:56:02 +08:00