-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
support setting default rules for resources #966
Conversation
using the LongAdder rather than AtomicInteger to Provides better performance
merge master
…perties directory
merge online
…cator to load log config
merge onlie
merge online
This reverts commit d401c2f
thanks for the code,it is helpful when i also need the global rule,but i think the code has a bug the right expectation is: but actual performance:
2 I set my degrade rule, is work when remove happend,nacos handler will call and in the for code,defaultDegradeRules has remove resource
so degradeRules cannot add the global rule back
|
Does this pull request fix one issue?
Fixes #66
Describe how you did it
I adopt another design:
the default rules can be created and added in the resource pre-source init while application first time access resource.
I put this op in the old lookProcessChain method, now it rename to lookProcessChainAndInitDefaultRules.
The reason I do this as follows:
1. resource corresponding default rules can be created one time and only one time.
2. it's thread safe, if we do it at other place we may need extract syn op.
3. setting resource's default rules can be treated as a part of init method.
4. it's created on demand.
Describe how to verify it
run test cases.
Special notes for reviews