Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global fallback support for AspectJ annotation extension #3116

Open
wants to merge 66 commits into
base: 1.8
Choose a base branch
from

Conversation

luffy0223
Copy link

Describe what this PR does / why we need it

Add global fallback support for AspectJ annotation extension

Does this pull request fix one issue?

Fixes #3110

Describe how you did it

add global fallback interface and let it as the member of @SentinelResource,
cache and call the global fallback instance in the aspect when origin method throws Throwable

Describe how to verify it

Use unit test to verify the correctness

Special notes for reviews

NONE

EzrealOf and others added 30 commits September 29, 2022 16:16
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…uster-server-envoy-rls module (alibaba#2921)

Bumps [snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 1.26 to 1.32.
- [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-1.32..snakeyaml-1.26)

---
updated-dependencies:
- dependency-name: org.yaml:snakeyaml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2842)

* opensergo.sdk.version: 0.1.0-alpha
* Current supported strategies: RateLimitStrategy, ThrottlingStrategy, CircuitBreakerStrategy

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
* Rename: DefaultDegradeSlot -> DefaultCircuitBreakerSlot
* Refine DefaultCircuitBreakerRuleManager
* Add test cases

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…he-dubbo (alibaba#2923)

Bumps [dubbo](https://github.com/apache/dubbo) from 2.7.3 to 2.7.18.
- [Release notes](https://github.com/apache/dubbo/releases)
- [Changelog](https://github.com/apache/dubbo/blob/3.1/CHANGES.md)
- [Commits](apache/dubbo@dubbo-2.7.3...dubbo-2.7.18)

---
updated-dependencies:
- dependency-name: org.apache.dubbo:dubbo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add dockerfile for dashboard with doc update
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
… 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>
* fix thread blocked problem of etcd watcher

in the previous version of EtcdDataSource, when the flowRules defined in the etcd change and trigger etcd watcher, there will be a following error:
2022-12-07 14:36:03.592 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] -  Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 2336 ms, time limit is 2000 ms
2022-12-07 14:36:04.592 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] -  Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 3337 ms, time limit is 2000 ms
2022-12-07 14:36:05.592 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] -  Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 4337 ms, time limit is 2000 ms
2022-12-07 14:36:06.595 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] -  Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 5337 ms, time limit is 2000 ms
io.vertx.core.VertxException: Thread blocked
 at sun.misc.Unsafe.park(Native Method)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1707)
 at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3334)
 at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1742)
 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
 at com.htsc.fst.saas.infrastructure.component.EtcdDataSource.readSource(EtcdDataSource.java:92)
 at com.htsc.fst.saas.infrastructure.component.EtcdDataSource.readSource(EtcdDataSource.java:23)
 at com.alibaba.csp.sentinel.datasource.AbstractDataSource.loadConfig(AbstractDataSource.java:44)
 at com.htsc.fst.saas.infrastructure.component.EtcdDataSource.lambda$initWatcher$0(EtcdDataSource.java:74)
 at com.htsc.fst.saas.infrastructure.component.EtcdDataSource$$Lambda$480/1375681611.accept(Unknown Source)
 at io.etcd.jetcd.Watch$1.onNext(Watch.java:183)
 at io.etcd.jetcd.impl.WatchImpl$WatcherImpl.onNext(WatchImpl.java:310)
 at io.etcd.jetcd.impl.WatchImpl$WatcherImpl$$Lambda$488/2088661957.handle(Unknown Source

I guess the reason is : when the watcher hold etcd Client, you can't use etcd Client in the Watch's consumer function. 
Besides the problem above, use getKeyValue() in the watchEvent can reduce once invoke with etcd server to getting the latest flowRules :)

* Update EtcdDataSource.java

Add charset adaptation -- accept the suggestion from @LProDreamAll
…-source (alibaba#2963)

* Fix issue to upgrade curator-recipes and related API.
* Resolve test failure: ClassNotFoundException of ZooKeeperAdmin.
* Remove unused property in pom.
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: frank-zsy <syzhao1988@126.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
@sczyh30
Copy link
Member

sczyh30 commented May 30, 2023

Could you please re-sync with the master branch? We fixed a CI problem in the master branch.

@luffy0223
Copy link
Author

Could you please re-sync with the master branch? We fixed a CI problem in the master branch.

auto build failed because sentinel-datasource-consul module unable to collect dependences

@luffy0223 luffy0223 requested a review from sczyh30 June 7, 2023 06:33
LiYangSir and others added 11 commits June 14, 2023 23:48
…d it as a member of SentinelResourceAspect, and inject it in the constructor
* fix issues/1463 : Make default JUL-based logging asynchronous
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…ertificate manager, authentication) as part of traffic governance module
…plementation

* Add fundamental building blocks for zero-trust (certificate manager, authentication) as part of the traffic governance module (流量治理-零信任模块实现)
* make all ThreadPool static final

* update github workflow
@@ -16,6 +16,7 @@
package com.alibaba.csp.sentinel.annotation.cdi.interceptor;

import com.alibaba.csp.sentinel.EntryType;
import com.alibaba.csp.sentinel.fallback.SentinelAnnotationGlobalFallback;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete unnecessary modifications.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete unnecessary modifications.

done

@luffy0223 luffy0223 changed the base branch from master to 1.8 April 11, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/annotation Issues or PRs related to annotation support kind/enhancement Category issues or prs related to enhancement. to-review To review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add global fallback support for AspectJ annotation extension