modify dubbo plugin configuration based on selector#5953
Merged
Aias00 merged 42 commits intoapache:masterfrom Jun 20, 2025
Merged
modify dubbo plugin configuration based on selector#5953Aias00 merged 42 commits intoapache:masterfrom
Aias00 merged 42 commits intoapache:masterfrom
Conversation
moremind
requested changes
Mar 10, 2025
...-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
Outdated
Show resolved
Hide resolved
...-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
Outdated
Show resolved
Hide resolved
...-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
Outdated
Show resolved
Hide resolved
…ector' into feature/dubbo-config-base-on-selector
Contributor
|
@Wweiei if u got time, fix the conflicts |
…g-base-on-selector # Conflicts: # db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql # db/upgrade/2.7.0-upgrade-2.7.1-ob.sql # db/upgrade/2.7.0-upgrade-2.7.1-og.sql # db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql # db/upgrade/2.7.0-upgrade-2.7.1-pg.sql
Contributor
Author
|
Contributor
|
@Wweiei hi, fix the ci, pls |
…g-base-on-selector # Conflicts: # db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql # db/upgrade/2.7.0-upgrade-2.7.1-ob.sql # db/upgrade/2.7.0-upgrade-2.7.1-og.sql # db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql # db/upgrade/2.7.0-upgrade-2.7.1-pg.sql
3 tasks
Contributor
|
@Wweiei fix ci pls |
moremind
requested changes
Apr 15, 2025
shenyu-common/src/main/java/org/apache/shenyu/common/constant/Constants.java
Show resolved
Hide resolved
...henyu-examples-dubbo/shenyu-examples-apache-dubbo-service/src/main/resources/application.yml
Outdated
Show resolved
Hide resolved
...henyu-examples-dubbo/shenyu-examples-apache-dubbo-service/src/main/resources/application.yml
Show resolved
Hide resolved
| } | ||
|
|
||
| ReferenceConfig<GenericService> reference = new ReferenceConfig<>(); | ||
| reference.setGeneric("true"); |
Contributor
Author
There was a problem hiding this comment.
If it set to "true", it means the generic invocation function is enabled.Otherwise, when initializing ReferenceConfig, the caller still needs to hold the Class object of the service interface.
...-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
Outdated
Show resolved
Hide resolved
...dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
Outdated
Show resolved
Hide resolved
...dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Copilot reviewed 12 out of 22 changed files in this pull request and generated 1 comment.
Files not reviewed (10)
- db/init/mysql/schema.sql: Language not supported
- db/init/ob/schema.sql: Language not supported
- db/init/og/create-table.sql: Language not supported
- db/init/oracle/schema.sql: Language not supported
- db/init/pg/create-table.sql: Language not supported
- db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql: Language not supported
- db/upgrade/2.7.0-upgrade-2.7.1-ob.sql: Language not supported
- db/upgrade/2.7.0-upgrade-2.7.1-og.sql: Language not supported
- db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql: Language not supported
- db/upgrade/2.7.0-upgrade-2.7.1-pg.sql: Language not supported
...dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
Outdated
Show resolved
Hide resolved
…g-base-on-selector
…g-base-on-selector # Conflicts: # db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql # db/upgrade/2.7.0-upgrade-2.7.1-ob.sql # db/upgrade/2.7.0-upgrade-2.7.1-og.sql # db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql
moremind
approved these changes
Jun 20, 2025
478320
pushed a commit
to 478320/shenyu
that referenced
this pull request
Jul 17, 2025
* modify dubbo plugin configuration based on selector * code optimization,change some magic value in ApacheDubboConfigCache * fix: dubbo plugin configuration base on selector code review --------- Co-authored-by: xiaoyu <xiaoyu@apache.org> Co-authored-by: aias00 <liuhongyu@apache.org> Co-authored-by: zhengpeng <847850277@qq.com> Co-authored-by: VampireAchao <achao@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
complete task 4 in #5923 , modify dubbo registry config base on selector.
if the dubbo selector parameter registry is empty, it will use the default plugin config. i add a common method to get the dubbo ReferenceConfig in ApacheDubboProxyService.java#getReferenceConfig
when invoke the api 'http://localhost:9195/dubbo/findById', it will throw No provider exception.
when invoke the api the 'dubboUpstreams' is not empty in ApacheDubboProxyService.java#getReferenceConfig
then chose one upstream and create a new ReferenceConfig with a new cacheKey
finally, it will use the new ReferenceConfig to invoke the dubbo interface through the new registry。
And when use the multi registry or there are multiple Dubbo instances, the custom dubbo LoadBalance ApacheDubboGrayLoadBalance will be triggered, so when build the ReferenceConfig i didn't use reference.setLoadbalance("gray") and methodConfig.setLoadbalance("gray").
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.