[dubbo-go] branch main updated: fix:polaris service discovery cause nil panic (#2317)
This is an automated email from the ASF dual-hosted git repository. justxuewei pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git The following commit(s) were added to refs/heads/main by this push: new cbcfdb4f0 fix:polaris service discovery cause nil panic (#2317) cbcfdb4f0 is described below commit cbcfdb4f0c274ffb9e6a81a0db1bb8ae622b8a3e Author: liaochuntao AuthorDate: Wed May 31 12:17:41 2023 +0800 fix:polaris service discovery cause nil panic (#2317) --- registry/polaris/service_discovery.go | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/registry/polaris/service_discovery.go b/registry/polaris/service_discovery.go index 4bd3e0144..81398ce2c 100644 --- a/registry/polaris/service_discovery.go +++ b/registry/polaris/service_discovery.go @@ -79,11 +79,10 @@ func newPolarisServiceDiscovery(url *common.URL) (registry.ServiceDiscovery, err newInstance := { namespace: discoveryURL.GetParam(constant.RegistryNamespaceKey, constant.PolarisDefaultNamespace), descriptor:descriptor, - instanceLock: {}, consumer: consumerApi, provider: providerApi, + services: gxset.NewSet(), registryInstances: make(map[string]*PolarisInstanceInfo), - listenerLock: {}, watchers: make(map[string]*PolarisServiceWatcher), } return newInstance, nil @@ -95,10 +94,10 @@ type polarisServiceDiscovery struct { provider api.ProviderAPI consumer api.ConsumerAPI services *gxset.HashSet - instanceLock *sync.RWMutex + instanceLock sync.RWMutex registryInstances map[string]*PolarisInstanceInfo watchers map[string]*PolarisServiceWatcher - listenerLock *sync.RWMutex + listenerLock sync.RWMutex } // Destroy destroy polarisServiceDiscovery, will do unregister all ServiceInstance
[dubbo-admin] branch dependabot/npm_and_yarn/dubbo-admin-ui/loader-utils-1.4.2 created (now f7b196ec)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/npm_and_yarn/dubbo-admin-ui/loader-utils-1.4.2 in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git at f7b196ec Bump loader-utils from 1.4.0 to 1.4.2 in /dubbo-admin-ui No new revisions were added by this update.
[dubbo-admin] branch dependabot/npm_and_yarn/dubbo-admin-ui/json5-and-vue/cli-plugin-babel-and-vue/cli-plugin-eslint-and-vue/cli-plugin-router-and-vue/cli-service-and-vue/cli-plugin-vuex-and-vue/eslin
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/npm_and_yarn/dubbo-admin-ui/json5-and-vue/cli-plugin-babel-and-vue/cli-plugin-eslint-and-vue/cli-plugin-router-and-vue/cli-service-and-vue/cli-plugin-vuex-and-vue/eslint-config-standard-2.2.3 in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git was d45349d7 Bump json5, @vue/cli-plugin-babel, @vue/cli-plugin-eslint, @vue/cli-plugin-router, @vue/cli-service, @vue/cli-plugin-vuex and @vue/eslint-config-standard The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[dubbo-website] branch master updated: Update spring-boot.md (#2634)
This is an automated email from the ASF dual-hosted git repository. albumenj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-website.git The following commit(s) were added to refs/heads/master by this push: new 37bee00e8a Update spring-boot.md (#2634) 37bee00e8a is described below commit 37bee00e8a3378bb7ea062570139f5e7d5bb3ae9 Author: Gabriel <65244590+gabriel-1...@users.noreply.github.com> AuthorDate: Wed May 31 11:51:32 2023 +0800 Update spring-boot.md (#2634) Fixed two small problems that confuse beginers. --- content/zh-cn/overview/quickstart/java/spring-boot.md | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/content/zh-cn/overview/quickstart/java/spring-boot.md b/content/zh-cn/overview/quickstart/java/spring-boot.md index 0bfc4c592d..0531ab567d 100644 --- a/content/zh-cn/overview/quickstart/java/spring-boot.md +++ b/content/zh-cn/overview/quickstart/java/spring-boot.md @@ -243,6 +243,17 @@ docker run --name some-zookeeper -p 2181:2181 --restart always -d zookeeper 编辑 `./pom.xml` 这个文件,添加下列配置。 ```xml +org.apache.dubbo +dubbo-spring-boot-demo +1.0-SNAPSHOT +pom + + +dubbo-spring-boot-demo-interface +dubbo-spring-boot-demo-provider +dubbo-spring-boot-demo-consumer + + 3.2.0-beta.4 2.7.8 @@ -304,7 +315,7 @@ docker run --name some-zookeeper -p 2181:2181 --restart always -d zookeeper org.apache.dubbo -dubbo-spring-boot-interface +dubbo-spring-boot-demo-interface ${project.parent.version}
[dubbo] 09/36: Merge remote-tracking branch 'dubbo_rem/master' into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit e3fd2750306a3d2a05bea480723928431f4b38d5 Merge: fe15c3e9bf 66e8abc00e Author: Xin Wang AuthorDate: Thu Jan 21 10:53:38 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' into master .../src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[dubbo] 05/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit ddb78a93fbfde81000e1381bc623cc8a2e4d1eb4 Merge: 339d23453e 3fc2d100bb Author: Xin Wang AuthorDate: Sat Nov 21 11:00:16 2020 +0800 Merge remote-tracking branch 'dubbo_rem/master' .github/workflows/unit-test.yml| 67 .../org/apache/dubbo/common/bytecode/Wrapper.java | 6 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 8 +- .../dubbo/common/model/SerializablePerson.java | 5 +- .../apache/dubbo/common/utils/PojoUtilsTest.java | 91 -- .../metadata/MetadataServiceExporterTest.java | 1 + .../org/apache/dubbo/config/spring/ConfigTest.java | 8 +- .../dubbo/config/spring/ServiceBeanTest.java | 2 + .../AnnotationPropertyValuesAdapterTest.java | 2 + .../annotation/DubboReferenceGenericTest.java | 3 + .../factory/annotation/MergedAnnotationTest.java | 2 + .../ReferenceAnnotationBeanPostProcessorTest.java | 3 + .../annotation/ReferenceBeanBuilderTest.java | 3 + .../ServiceAnnotationBeanPostProcessorTest.java| 3 + .../annotation/ServiceBeanNameBuilderTest.java | 4 +- .../annotation/ServiceClassPostProcessorTest.java | 3 + .../MultipleServicesWithMethodConfigsTest.java | 2 + .../config/YamlPropertySourceFactoryTest.java | 2 + .../DubboComponentScanRegistrarTest.java | 2 + .../annotation/DubboConfigConfigurationTest.java | 2 + .../context/annotation/EnableDubboConfigTest.java | 6 ++ .../spring/context/annotation/EnableDubboTest.java | 2 + .../annotation/consumer/ConsumerConfiguration.java | 2 +- .../annotation/provider/ProviderConfiguration.java | 6 +- .../properties/DefaultDubboConfigBinderTest.java | 3 + .../extension/SpringExtensionFactoryTest.java | 2 + .../dubbo/config/spring/issues/Issue6252Test.java | 2 + .../registry/nacos/nacos/NacosServiceNameTest.java | 4 +- .../spring/schema/DubboNamespaceHandlerTest.java | 12 +++ .../config/spring/schema/GenericServiceTest.java | 3 + .../spring/status/DataSourceStatusCheckerTest.java | 2 + .../spring/status/SpringStatusCheckerTest.java | 2 + .../src/main/resources/spring/dubbo-provider.xml | 2 +- .../annotation/processing/util/TypeUtilsTest.java | 2 + .../dubbo/monitor/dubbo/MetricsFilterTest.java | 60 -- .../apache/dubbo/registry/redis/RedisRegistry.java | 43 +- .../rpc/protocol/dubbo/ArgumentCallbackTest.java | 14 ++-- 37 files changed, 291 insertions(+), 95 deletions(-)
[dubbo] 12/36: Merge branch 'master' of https://github.com/lovepoem/dubbo
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 857056034b7a223e36b81a1af0f7913d6125708a Merge: 85deac0490 f9c174cd17 Author: Xin Wang AuthorDate: Wed Feb 24 19:26:39 2021 +0800 Merge branch 'master' of https://github.com/lovepoem/dubbo
[dubbo] 06/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 443876c66b9ec7c5bccdb36337eb91b85adede0c Merge: ddb78a93fb d98d48914b Author: Xin Wang AuthorDate: Sat Jan 2 18:41:47 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' README.md | 18 .../dubbo/config/utils/ConfigValidationUtils.java | 24 +- .../PublishingServiceDefinitionListenerTest.java | 1 + 3 files changed, 33 insertions(+), 10 deletions(-)
[dubbo] 34/36: Merge branch 'master' of https://github.com/lovepoem/dubbo
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit d8e7b53f01caf91227fc0800ecaf7cb81416da56 Merge: 7ea1efeeae 4f664f0a3d Author: Xin Wang AuthorDate: Sat Feb 18 09:08:25 2023 +0800 Merge branch 'master' of https://github.com/lovepoem/dubbo NOTICE | 2 +- .../common/beanutil/JavaBeanSerializeUtil.java | 16 +++-- .../dubbo/common/constants/CommonConstants.java| 6 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 9 +-- .../dubbo/common/utils/SerializeClassChecker.java | 22 +-- .../main/resources/security/serialize.blockedlist | 74 +++--- .../org/apache/dubbo/common/beanutil/Bean.java | 11 ++-- .../java/org/apache/dubbo/common/model/Person.java | 3 +- .../java/org/apache/dubbo/common/model/User.java | 3 +- .../apache/dubbo/common/utils/PojoUtilsTest.java | 39 ++-- .../common/utils/SerializeClassCheckerTest.java| 32 -- dubbo-dependencies-bom/pom.xml | 2 +- .../dubbo-dependencies-zookeeper/pom.xml | 2 +- pom.xml| 2 +- 14 files changed, 146 insertions(+), 77 deletions(-)
[dubbo] 36/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 1f84cdcfede5ec9843ecebf39a25d9b995b8098b Merge: 96292bc07b e1a7991ab8 Author: Xin Wang AuthorDate: Wed May 31 11:09:33 2023 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../dubbo/remoting/SerializationException.java | 79 ++ .../apache/dubbo/remoting/exchange/Response.java | 5 ++ .../remoting/exchange/codec/ExchangeCodec.java | 2 +- .../remoting/exchange/support/DefaultFuture.java | 5 +- .../dubbo/remoting/codec/ExchangeCodecTest.java| 2 +- .../transport/codec/DeprecatedExchangeCodec.java | 2 +- .../transport/netty4/NettyClientHandler.java | 7 +- .../dubbo/rpc/protocol/AsyncToSyncInvoker.java | 6 +- 8 files changed, 102 insertions(+), 6 deletions(-)
[dubbo] 22/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 9f650712bdf37f9448d9643a5febd7860c6c61aa Merge: 35bc823c90 21b08f0320 Author: wangxin813 AuthorDate: Fri Jul 2 11:48:22 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../org/apache/dubbo/config/ServiceConfig.java | 9 +- .../dubbo/config/utils/ReferenceConfigCache.java | 3 +- .../dubbo/config/spring/api/MethodCallback.java| 62 .../annotation/MethodConfigCallbackTest.java | 42 +++--- .../annotation/provider/ProviderConfiguration.java | 27 +++- .../config/spring/impl/MethodCallbackImpl.java | 162 ++--- .../definition/ServiceDefinitionBuilder.java | 21 ++- .../definition/model/MethodDefinition.java | 15 +- .../definition/model/ServiceDefinition.java| 7 +- .../main/java/org/apache/dubbo/auth/Constants.java | 2 + .../apache/dubbo/auth/DefaultAccessKeyStorage.java | 2 +- .../org/apache/dubbo/rpc/support/RpcUtils.java | 19 ++- 12 files changed, 238 insertions(+), 133 deletions(-)
[dubbo] 29/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit e9d73729cf9478ffecf2cab04192eb32b2ae4740 Merge: d89027f216 321789d813 Author: Xin Wang AuthorDate: Thu Aug 12 11:07:48 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../org/apache/dubbo/rpc/cluster/Constants.java| 1 - dubbo-dependencies-bom/pom.xml | 16 +- .../dubbo-dependencies-zookeeper/pom.xml | 2 +- .../java/org/apache/dubbo/registry/Constants.java | 4 + .../client/OverrideInstanceAddressURL.java | 276 + .../client/ServiceDiscoveryRegistryDirectory.java | 169 + .../registry/integration/RegistryProtocol.java | 5 +- .../remoting/exchange/support/DefaultFuture.java | 5 - .../exchange/support/DefaultFutureTest.java| 11 + .../rpc/protocol/hessian/HessianProtocolTest.java | 25 +- pom.xml| 2 +- 11 files changed, 489 insertions(+), 27 deletions(-)
[dubbo] 32/36: Merge branch 'master' of https://github.com/lovepoem/dubbo
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 58d9f1ad316418293f79ded9966ce849e86b4354 Merge: 6eaa230fa2 d4cd753750 Author: Xin Wang AuthorDate: Thu Aug 26 09:16:05 2021 +0800 Merge branch 'master' of https://github.com/lovepoem/dubbo
[dubbo] 14/36: Merge branch 'master' of https://github.com/lovepoem/dubbo
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 5785b95fe2fd3f95ea100df1ccbf536eccb80733 Merge: 5068fb124d 857056034b Author: Xin Wang AuthorDate: Tue Mar 2 09:22:36 2021 +0800 Merge branch 'master' of https://github.com/lovepoem/dubbo
[dubbo] 04/36: Merge remote-tracking branch 'dubbo_rem/master' into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 339d23453e130fe9eb0e60a0e0bb30c71369cf14 Merge: 2ddacd6f4f c0a205faa3 Author: Xin Wang AuthorDate: Thu Nov 5 21:09:52 2020 +0800 Merge remote-tracking branch 'dubbo_rem/master' into master .../main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[dubbo] 20/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 153a67b7161308a9737198d8611fe2e5d7920828 Merge: 6bdea3fe0f 149d1f68e5 Author: Xin Wang AuthorDate: Thu Jun 10 11:49:31 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' NOTICE | 8 - PULL_REQUEST_TEMPLATE.md | 7 +- dubbo-all/pom.xml | 24 +- dubbo-bom/pom.xml | 33 +++ .../org/apache/dubbo/rpc/cluster/Constants.java| 1 + .../{support => }/ProviderURLMergeProcessor.java | 18 +- .../cluster/configurator/AbstractConfigurator.java | 44 +-- .../ConsumerContextClusterInterceptor.java | 5 +- .../interceptor/ZoneAwareClusterInterceptor.java | 7 +- .../dubbo/rpc/cluster/support/ClusterUtils.java| 116 +--- .../dubbo/rpc/cluster/support/FailbackCluster.java | 2 +- .../dubbo/rpc/cluster/support/FailfastCluster.java | 2 +- .../dubbo/rpc/cluster/support/FailoverCluster.java | 2 +- .../cluster/support/FailoverClusterInvoker.java| 20 +- .../dubbo/rpc/cluster/support/FailsafeCluster.java | 2 +- .../dubbo/rpc/cluster/support/ForkingCluster.java | 2 +- .../DefaultProviderURLMergeProcessor.java} | 270 - .../cluster/support/registry/ZoneAwareCluster.java | 2 +- .../support/registry/ZoneAwareClusterInvoker.java | 6 +- ...che.dubbo.rpc.cluster.ProviderURLMergeProcessor | 1 + .../ConsumerContextClusterInterceptorTest.java | 107 +++ .../ZoneAwareClusterInterceptorTest.java | 97 ++ .../rpc/cluster/support/ClusterUtilsTest.java | 4 + .../support/FailoverClusterInvokerTest.java| 28 ++ .../internal/org.apache.dubbo.rpc.ZoneDetector | 1 + .../cluster/router/file/availablerule.javascript | 17 +- .../rpc/cluster/router/file/methodrule.javascript | 17 +- .../router/file/notAvailablerule.javascript| 17 +- .../apache/dubbo/common/BaseServiceMetadata.java | 13 +- .../src/main/java/org/apache/dubbo/common/URL.java | 12 +- .../dubbo/common/bytecode/ClassGenerator.java | 2 +- .../common/bytecode/CustomizedLoaderClassPath.java | 10 +- .../org/apache/dubbo/common/compiler/Compiler.java | 3 +- .../common/compiler/support/JavassistCompiler.java | 2 + .../dubbo/common/compiler/support/JdkCompiler.java | 2 + .../dubbo/common/config/ConfigurationUtils.java| 4 +- .../dubbo/common/constants/CommonConstants.java| 13 + .../dubbo/common/extension/ExtensionLoader.java| 87 -- .../apache/dubbo/common/threadpool/ThreadPool.java | 3 +- .../manager/DefaultExecutorRepository.java | 5 +- .../support/cached/CachedThreadPool.java | 2 + .../threadpool/support/eager/EagerThreadPool.java | 2 + .../threadpool/support/fixed/FixedThreadPool.java | 2 + .../support/limited/LimitedThreadPool.java | 2 + .../dubbo/common/utils/CharSequenceComparator.java | 2 +- .../org/apache/dubbo/common/utils/LFUCache.java| 214 +++--- .../org/apache/dubbo/common/utils/LRUCache.java| 46 ++- .../dubbo/common/utils/MethodComparator.java | 2 +- .../org/apache/dubbo/common/utils/NetUtils.java| 65 ++-- .../org/apache/dubbo/common/utils/UrlUtils.java| 2 +- .../apache/dubbo/config/ConfigCenterConfig.java| 4 + .../java/org/apache/dubbo/config/Constants.java| 12 +- .../org/apache/dubbo/config/ConsumerConfig.java| 19 ++ .../org/apache/dubbo/config/ProtocolConfig.java| 4 +- .../org/apache/dubbo/config/ProviderConfig.java| 2 +- .../org/apache/dubbo/config/RegistryConfig.java| 8 +- .../java/org/apache/dubbo/config/SslConfig.java| 29 ++ .../apache/dubbo/config/context/ConfigManager.java | 24 +- .../dubbo/common/BaseServiceMetadataTest.java | 6 +- .../test/java/org/apache/dubbo/common/URLTest.java | 98 ++ .../common/compiler/support/JavaCodeTest.java | 2 +- .../config/EnvironmentConfigurationTest.java | 2 +- .../common/extension/ExtensionLoaderTest.java | 158 -- .../duplicated/DuplicatedOverriddenExt.java| 13 +- .../duplicated/DuplicatedWithoutOverriddenExt.java | 14 +- .../duplicated/impl/DuplicatedOverriddenExt1.java | 16 +- .../duplicated/impl/DuplicatedOverriddenExt2.java | 16 +- .../impl/DuplicatedWithoutOverriddenExt1.java | 16 +- .../impl/DuplicatedWithoutOverriddenExt2.java | 16 +- .../dubbo/common/infra/InfraAdapterTest.java | 67 + .../concurrent/ScheduledCompletableFutureTest.java | 53 .../threadpool/manager/ExecutorRepositoryTest.java | 58 .../apache/dubbo/common/utils/ConfigUtilsTest.java | 8 +- .../org/apache/dubbo/common/utils/JVMUtilTest.java | 10 + .../apache/dubbo/common/utils/LFUCacheTest.java| 30 ++
[dubbo] 23/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit b419a17e9e32bf60645688514eb14ccebe0226a0 Merge: 9f650712bd c5a4597a00 Author: Xin Wang AuthorDate: Wed Jul 7 19:51:20 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../java/org/apache/dubbo/common/constants/CommonConstants.java | 1 + .../src/main/java/org/apache/dubbo/config/ServiceConfig.java | 9 +++-- 2 files changed, 4 insertions(+), 6 deletions(-)
[dubbo] 24/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 989ee68f6a0325235aca66f03a1ec500cbca17ef Merge: b419a17e9e 3548eab668 Author: Xin Wang AuthorDate: Mon Jul 12 14:06:41 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../support/MergeableClusterInvokerTest.java | 3 +- .../apache/dubbo/common/config/Environment.java| 5 ++ .../dubbo/common/extension/ExtensionLoader.java| 2 + .../apache/dubbo/config/ConfigCenterConfig.java| 20 +-- .../apache/dubbo/config/MetadataReportConfig.java | 63 +-- .../org/apache/dubbo/config/RegistryConfig.java| 5 -- .../org/apache/dubbo/config/DubboShutdownHook.java | 19 -- .../dubbo/config/bootstrap/DubboBootstrap.java | 18 +++--- .../config/utils/ReferenceConfigCacheTest.java | 2 + .../src/main/resources/META-INF/dubbo.xsd | 10 .../support/nacos/NacosDynamicConfiguration.java | 10 +++- .../telnet/support/TelnetHandlerAdapter.java | 4 +- .../telnet/support/TelnetHandlerAdapterTest.java | 70 ++ 13 files changed, 198 insertions(+), 33 deletions(-)
[dubbo] 26/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 17e86ce5009a26da39a600d9ab3e506ca21f6106 Merge: ad61a068f4 352a0df89d Author: wangxin813 AuthorDate: Thu Jul 15 14:17:52 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' dubbo-all/pom.xml | 8 + dubbo-bom/pom.xml | 5 + dubbo-compatible/pom.xml | 5 + .../dubbo-configcenter-zookeeper/pom.xml | 5 + .../ZookeeperDynamicConfigurationFactory.java | 6 + .../zookeeper/ZookeeperMetadataReportFactory.java | 6 + dubbo-registry/dubbo-registry-zookeeper/pom.xml| 7 +- .../zookeeper/ZookeeperRegistryFactory.java| 8 +- dubbo-remoting/dubbo-remoting-api/pom.xml | 2 +- .../zookeeper}/AbstractZookeeperClient.java| 6 +- .../zookeeper}/AbstractZookeeperTransporter.java | 10 +- .../dubbo/remoting/zookeeper/ChildListener.java| 0 .../dubbo/remoting/zookeeper/DataListener.java | 0 .../apache/dubbo/remoting/zookeeper/EventType.java | 21 --- .../dubbo/remoting/zookeeper/StateListener.java| 0 .../dubbo/remoting/zookeeper/ZookeeperClient.java | 0 .../remoting/zookeeper/ZookeeperTransporter.java | 30 +++- .../pom.xml| 14 +- .../curator5/Curator5ZookeeperClient.java} | 36 ++-- .../curator5/Curator5ZookeeperTransporter.java}| 16 +- ...e.dubbo.remoting.zookeeper.ZookeeperTransporter | 1 + .../curator5/Curator5ZookeeperClientTest.java | 196 + .../curator5/Curator5ZookeeperTransporterTest.java | 57 ++ .../support/AbstractZookeeperTransporterTest.java | 9 +- dubbo-remoting/dubbo-remoting-zookeeper/pom.xml| 2 +- .../zookeeper/curator/CuratorZookeeperClient.java | 2 +- .../curator/CuratorZookeeperTransporter.java | 2 +- .../support/AbstractZookeeperTransporterTest.java | 3 +- dubbo-remoting/pom.xml | 3 +- 29 files changed, 384 insertions(+), 76 deletions(-)
[dubbo] 33/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 7ea1efeeae78d0c952e0a1182b3dbdfb12077d67 Merge: 58d9f1ad31 6f4011fff9 Author: Xin Wang AuthorDate: Sun Jan 1 23:36:59 2023 +0800 Merge remote-tracking branch 'dubbo_rem/master' .gitignore | 3 + README.md | 8 +- compiler/pom.xml | 4 +- .../org/apache/dubbo/rpc/cluster/Constants.java| 2 + .../cluster/loadbalance/AbstractLoadBalance.java | 9 +- .../loadbalance/ConsistentHashLoadBalance.java | 88 - .../cluster/support/FailbackClusterInvoker.java| 25 ++- .../rpc/cluster/support/ForkingClusterInvoker.java | 5 +- .../cluster/support/migration/MigrationRule.java | 3 +- .../support/wrapper/MockClusterInvoker.java| 7 +- .../loadbalance/AbstractLoadBalanceTest.java | 11 +- .../loadbalance/ConsistentHashLoadBalanceTest.java | 38 ++-- .../cluster/loadbalance/LoadBalanceBaseTest.java | 25 ++- .../support/AbstractClusterInvokerTest.java| 2 +- .../support/AvailableClusterInvokerTest.java | 114 +++ .../support/FailbackClusterInvokerTest.java| 96 + .../cluster/support/ForkingClusterInvokerTest.java | 41 +++- .../java/org/apache/dubbo/common/URLStrParser.java | 12 +- .../dubbo/common/compiler/support/JdkCompiler.java | 13 +- .../apache/dubbo/common/config/Environment.java| 10 +- .../dubbo/common/extension/DisableInject.java | 3 +- .../dubbo/common/extension/ExtensionLoader.java| 46 +++-- .../extension/{DisableInject.java => Inject.java} | 14 +- .../extension/support/WrapperComparator.java | 26 +-- .../dubbo/common/timer/HashedWheelTimer.java | 12 +- .../dubbo/common/utils/CompatibleTypeUtils.java| 13 +- .../org/apache/dubbo/common/utils/LFUCache.java| 214 - .../org/apache/dubbo/common/utils/NetUtils.java| 41 +++- .../org/apache/dubbo/common/utils/PojoUtils.java | 7 + .../dubbo/common/utils/SerializeClassChecker.java | 10 +- .../org/apache/dubbo/common/utils/UrlUtils.java| 47 ++--- .../dubbo/config/AbstractReferenceConfig.java | 21 +- .../apache/dubbo/config/MetadataReportConfig.java | 10 +- .../dubbo/config/annotation/DubboReference.java| 6 + .../apache/dubbo/config/annotation/Reference.java | 6 + .../apache/dubbo/config/context/ConfigManager.java | 12 +- .../apache/dubbo/rpc/model/ApplicationModel.java | 9 + .../org/apache/dubbo/rpc/model/ProviderModel.java | 3 +- .../test/java/org/apache/dubbo/common/URLTest.java | 39 +++- .../common/compiler/support/JavaCodeTest.java | 25 ++- .../common/compiler/support/JdkCompilerTest.java | 17 ++ .../extension/injection/impl/InjectExtImpl.java| 4 +- .../apache/dubbo/common/utils/LFUCacheTest.java| 30 --- ...sInterfaceDisplayNameHasMetaCharactersTest.java | 113 +++ .../apache/dubbo/common/utils/NetUtilsTest.java| 7 +- .../apache/dubbo/common/utils/PojoUtilsTest.java | 23 ++- .../apache/dubbo/common/utils/UrlUtilsTest.java| 18 +- .../org/apache/dubbo/config/MetricsConfigTest.java | 27 ++- .../dubbo/config/context/ConfigManagerTest.java| 4 +- .../java/com/alibaba/dubbo/rpc/RpcContext.java | 2 +- .../org/apache/dubbo/config/ReferenceConfig.java | 2 +- .../org/apache/dubbo/config/ServiceConfig.java | 51 + .../dubbo/config/bootstrap/DubboBootstrap.java | 27 +-- .../builders/AbstractReferenceBuilder.java | 13 ++ .../annotation/ServiceClassPostProcessor.java | 25 +-- ...onfigDefaultPropertyValueBeanPostProcessor.java | 2 +- ...ubboConfigEarlyInitializationPostProcessor.java | 127 .../DubboConfigEarlyRegistrationPostProcessor.java | 145 ++ .../dubbo/config/spring/util/DubboBeanUtils.java | 11 +- .../src/main/resources/META-INF/compat/dubbo.xsd | 5 + .../src/main/resources/META-INF/dubbo.xsd | 5 + .../annotation/ReferenceBeanBuilderTest.java | 19 +- .../config/DubboConfigEarlyInitializationTest.java | 63 ++ .../spring/dubbo-config-early-initialization.xml | 24 +-- .../support/nacos/NacosDynamicConfiguration.java | 8 + .../support/zookeeper/CacheListener.java | 4 +- .../zookeeper/ZookeeperDynamicConfiguration.java | 4 +- .../ZookeeperDynamicConfigurationFactory.java | 4 +- .../src/main/resources/spring/dubbo-consumer.xml | 2 +- dubbo-dependencies-bom/pom.xml | 21 +- .../dubbo-dependencies-zookeeper/pom.xml | 2 +- .../org/apache/dubbo/metadata/MetadataInfo.java| 14 +- .../definition/builder/MapTypeBuilder.java | 8 - .../zookeeper/ZookeeperMetadataReportFactory.java | 4 +-
[dubbo] 10/36: Merge remote-tracking branch 'dubbo_rem/master' into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit f9c174cd17c736c24d72173b890b4509737cb6d6 Merge: e3fd275030 d70b151e39 Author: Xin Wang AuthorDate: Mon Feb 8 10:28:14 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' into master .github/workflows/build-and-test.yml | 185 +++ .github/workflows/unit-test.yml| 67 --- Jenkinsfile| 6 +- NOTICE | 2 +- dubbo-all/pom.xml | 14 + dubbo-bom/pom.xml | 10 + .../org/apache/dubbo/rpc/cluster/Directory.java| 2 + .../rpc/cluster/directory/AbstractDirectory.java | 5 + .../migration/MigrationClusterComparator.java | 20 +- .../support/migration/MigrationClusterInvoker.java | 54 ++ .../cluster/support/migration/MigrationRule.java | 90 .../cluster/support/migration/MigrationStep.java | 17 +- .../support/registry/ZoneAwareClusterInvoker.java | 163 +- .../support/migration/MigrationRuleTest.java | 18 +- .../common/config/CompositeConfiguration.java | 14 +- .../dubbo/common/config/ConfigurationUtils.java| 12 + .../apache/dubbo/common/config/Environment.java| 23 +- .../dubbo/common/constants/RegistryConstants.java | 9 +- .../dubbo/config/AbstractInterfaceConfig.java | 11 +- .../org/apache/dubbo/config/ApplicationConfig.java | 12 + .../file/FileSystemDynamicConfigurationTest.java | 3 + .../dubbo/config/bootstrap/DubboBootstrap.java | 14 + .../bootstrap/DubboBootstrapStartStopListener.java | 24 +- .../ConfigurableMetadataServiceExporter.java | 53 +- .../dubbo/config/utils/ConfigValidationUtils.java | 6 +- .../dubbo/config/bootstrap/rest/UserService.java | 4 +- .../dubbo/config/url/InvokerSideConfigUrlTest.java | 2 +- .../org.apache.dubbo.registry.RegistryFactory | 1 + .../context/DubboBootstrapApplicationListener.java | 1 + ...bboBootstrapStartStopListenerSpringAdapter.java | 48 ++ .../context/event/DubboBootstrapStatedEvent.java | 50 ++ .../context/event/DubboBootstrapStopedEvent.java | 50 ++ ...onfig.bootstrap.DubboBootstrapStartStopListener | 1 + .../MultipleServicesWithMethodConfigsTest.java | 8 + .../consul/ConsulDynamicConfigurationTest.java | 246 - .../zookeeper/ZookeeperDynamicConfiguration.java | 2 +- .../dubbo-demo-service-consumer}/pom.xml | 41 +- .../dubbo/demo/consumer/ApplicationConsumer.java | 72 +++ .../consumer/RandomMigrationAddressComparator.java | 52 ++ .../dubbo/demo/consumer/TestFailoverCondition.java | 23 +- ...dubbo.metadata.store.failover.FailoverCondition | 1 + ...er.support.migration.MigrationClusterComparator | 1 + .../src/main/resources/dubbo.properties| 2 + .../src/main/resources/log4j.properties| 7 + .../resources/spring/dubbo-consumer-multiple.xml | 82 +++ .../spring/dubbo-consumer-sofaregistry.xml}| 13 +- .../resources/spring/dubbo-consumer-zk-apollo.xml} | 19 +- .../spring/dubbo-consumer-zk-sofaregistry.xml} | 12 +- .../main/resources/spring/dubbo-consumer-zk.xml} | 13 +- .../dubbo-demo-service-provider}/pom.xml | 20 +- .../dubbo/demo/provider/ApplicationProvider.java | 31 ++ .../dubbo/demo/provider/DemoServiceImpl.java | 53 ++ .../dubbo/demo/provider/GreetingServiceImpl.java | 15 +- .../provider/ServiceDemoMetadataParamsFilter.java | 20 +- .../dubbo/demo/provider/TestFailoverCondition.java | 23 +- .../org.apache.dubbo.metadata.MetadataParamsFilter | 1 + ...dubbo.metadata.store.failover.FailoverCondition | 1 + .../src/main/resources/dubbo.properties| 1 + .../src/main/resources/log4j.properties| 7 + .../resources/spring/dubbo-provider-multiple.xml} | 41 +- .../spring/dubbo-provider-sofaregistry.xml}| 4 +- .../resources/spring/dubbo-provider-zk-apollo.xml} | 18 +- .../spring/dubbo-provider-zk-sofaregistry.xml} | 3 +- .../main/resources/spring/dubbo-provider-zk.xml} | 12 +- .../dubbo-demo-service-provider2}/pom.xml | 12 +- .../dubbo/demo/provider/ApplicationProvider2.java | 15 +- .../dubbo/demo/provider/GreetingServiceImpl.java | 15 +- .../src/main/resources/dubbo.properties| 1 + .../src/main/resources/log4j.properties| 7 + .../main/resources/spring/dubbo-provider-zk.xml} | 8 +- dubbo-demo/dubbo-demo-service/pom.xml | 69 +++ .../dubbo-demo-xml/dubbo-demo-xml-consumer/pom.xml | 12 + .../src/main/resources/spring/dubbo-consumer.xml | 78 +-- .../dubbo-demo-xml/dubbo-demo-xml-provider/pom.xml | 12 + .../src/main/resources/spring/dubbo-provider.xml | 2 +- dubbo-demo/pom.xml
[dubbo] 28/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit d89027f21677937ac29cbf41ca3bb76efca83930 Merge: 2f9115f1e4 ca794b627c Author: Xin Wang AuthorDate: Fri Jul 30 19:48:48 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../cluster/support/BroadcastClusterInvoker.java | 2 +- .../cluster/support/migration/MigrationRule.java | 27 ++ .../ReferenceAnnotationBeanPostProcessor.java | 2 ++ dubbo-dependencies-bom/pom.xml | 2 +- .../registry/nacos/NacosServiceDiscovery.java | 3 ++- .../dubbo/remoting/transport/CodecSupport.java | 5 +--- 6 files changed, 30 insertions(+), 11 deletions(-)
[dubbo] 30/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit d4cd7537501c219062bc0f98ba6d18a4d0c31112 Merge: e9d73729cf 6acd5a2a93 Author: Xin Wang AuthorDate: Wed Aug 18 19:56:46 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../dubbo/config/AbstractMethodConfigTest.java | 41 -- .../factory/annotation/ReferenceBeanBuilder.java | 19 ++- .../annotation/ServiceClassPostProcessor.java | 23 +--- .../config/spring/util/DubboAnnotationUtils.java | 64 +- .../factory/annotation/ParameterConvertTest.java | 60 .../dubbo-remoting-zookeeper-curator5/pom.xml | 2 +- 6 files changed, 156 insertions(+), 53 deletions(-)
[dubbo] 21/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 35bc823c905f23c67e181152e0d10fc6aa1d9043 Merge: 153a67b716 b194bb0ea7 Author: Xin Wang AuthorDate: Thu Jun 24 09:04:29 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../src/main/java/org/apache/dubbo/common/URL.java | 2 +- .../java/org/apache/dubbo/common/URLStrParser.java | 36 +- .../org/apache/dubbo/common/utils/ClassHelper.java | 153 -- .../org/apache/dubbo/common/utils/PojoUtils.java | 24 +- .../org/apache/dubbo/config/ReferenceConfig.java | 24 +- .../org/apache/dubbo/config/ServiceConfig.java | 32 +- .../dubbo/config/bootstrap/DubboBootstrap.java | 2 +- .../bootstrap/builders/MetadataReportBuilder.java | 11 + .../dubbo/config/utils/ConfigValidationUtils.java | 3 + .../apache/dubbo/config/AbstractConfigTest.java| 2 + .../builders/MetadataReportBuilderTest.java| 10 +- .../DubboClassPathBeanDefinitionScanner.java | 23 +- .../org/apache/dubbo/config/spring/ConfigTest.java | 9 +- .../ReferenceAnnotationBeanPostProcessorTest.java | 23 +- .../apache/dubbo/config/spring/init-reference.xml | 2 +- dubbo-dependencies-bom/pom.xml | 2 +- .../dubbo-dependencies-zookeeper/pom.xml | 2 +- .../client/EventPublishingServiceDiscovery.java| 1 + .../apache/dubbo/registry/redis/RedisRegistry.java | 27 +- .../dubbo/registry/redis/RedisRegistryTest.java| 104 +++- .../support/command/StatusTelnetHandler.java | 5 +- .../org/apache/dubbo/rpc/filter/GenericFilter.java | 7 +- .../dubbo/rpc/protocol/AbstractProtocol.java | 232 - .../dubbo/rpc/protocol/AbstractProxyProtocol.java | 7 +- .../dubbo/rpc/protocol/DelegateExporterMap.java| 86 .../dubbo/rpc/protocol/dubbo/DubboExporter.java| 13 +- .../dubbo/rpc/protocol/dubbo/DubboProtocol.java| 11 +- .../dubbo/status/ThreadPoolStatusCheckerTest.java | 28 +- .../dubbo/rpc/protocol/injvm/InjvmExporter.java| 15 +- .../dubbo/rpc/protocol/injvm/InjvmInvoker.java | 12 +- .../dubbo/rpc/protocol/injvm/InjvmProtocol.java| 17 +- .../rpc/protocol/injvm/InjvmProtocolTest.java | 29 +- .../dubbo/rpc/protocol/thrift/ThriftProtocol.java | 544 ++--- pom.xml| 2 +- 34 files changed, 792 insertions(+), 708 deletions(-)
[dubbo] 17/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit d036b01248f019190eacbd2dc3e757830267670f Merge: f63a8bb665 0f5040b19f Author: Xin Wang AuthorDate: Mon Apr 12 14:57:23 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .github/workflows/build-and-test.yml | 28 +- CONTRIBUTING.md| 2 +- PULL_REQUEST_TEMPLATE.md | 8 +- README.md | 14 +- SECURITY.md| 6 +- dubbo-bom/pom.xml | 26 ++ .../apache/dubbo/rpc/cluster/ClusterInvoker.java | 2 +- .../cluster/configurator/AbstractConfigurator.java | 21 +- .../cluster/configurator/parser/ConfigParser.java | 44 +- .../config/model/ConditionRuleParser.java | 14 +- .../rpc/cluster/router/script/ScriptRouter.java| 47 +- .../cluster/router/tag/model/TagRuleParser.java| 19 +- .../support/migration/MigrationClusterInvoker.java | 4 +- .../cluster/support/migration/MigrationRule.java | 10 +- .../support/registry/ZoneAwareClusterInvoker.java | 104 ++--- .../org.apache.dubbo.rpc.cluster.RouterFactory | 1 - .../configurator/parser/ConfigParserTest.java | 12 +- .../dubbo/rpc/cluster/router/TagRouterTest.java| 2 +- .../org.apache.dubbo.rpc.cluster.RouterFactory | 1 + .../java/org/apache/dubbo/common/Parameters.java | 8 +- .../main/java/org/apache/dubbo/common/Version.java | 7 +- .../common/beanutil/JavaBeanSerializeUtil.java | 4 +- .../org/apache/dubbo/common/bytecode/Mixin.java| 2 +- .../org/apache/dubbo/common/bytecode/Wrapper.java | 16 +- .../dubbo/common/compiler/support/ClassUtils.java | 12 +- .../common/compiler/support/CtClassBuilder.java| 14 +- .../dubbo/common/constants/CommonConstants.java| 21 +- .../dubbo/common/constants/RegistryConstants.java | 2 +- .../extension/AdaptiveClassCodeGenerator.java | 2 +- .../dubbo/common/extension/ExtensionLoader.java| 11 +- .../extension/support/ActivateComparator.java | 16 +- .../java/org/apache/dubbo/common/json/JSON.java| 20 +- .../common/threadpool/ThreadlessExecutor.java | 8 +- .../dubbo/common/utils/CompatibleTypeUtils.java| 8 +- .../org/apache/dubbo/common/utils/MethodUtils.java | 8 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 155 +-- .../apache/dubbo/common/utils/ReflectUtils.java| 2 +- .../dubbo/common/utils/SerializeClassChecker.java | 150 +++ .../org/apache/dubbo/common/utils/StringUtils.java | 4 +- .../java/org/apache/dubbo/config/Constants.java| 2 + .../dubbo/config/annotation/DubboReference.java| 7 + .../dubbo/rpc/support/GroupServiceKeyCache.java| 2 +- .../main/resources/security/serialize.blockedlist | 167 +++ .../apache/dubbo/common/bytecode/WrapperTest.java | 52 ++- .../common/extension/ExtensionLoaderTest.java | 9 + .../extension/activate/ActivateWrapperExt1.java| 25 +- .../activate/impl/ActivateWrapperExt1Impl1.java| 28 +- .../activate/impl/ActivateWrapperExt1Impl2.java| 28 +- .../activate/impl/ActivateWrapperExt1Wrapper.java | 32 +- .../extension/support/ActivateComparatorTest.java | 22 +- .../threadlocal/InternalThreadLocalTest.java | 1 + .../apache/dubbo/common/utils/NetUtilsTest.java| 11 +- .../apache/dubbo/common/utils/PojoUtilsTest.java | 50 +++ .../common/utils/SerializeClassCheckerTest.java| 105 + ...o.common.extension.activate.ActivateWrapperExt1 | 3 + .../org/apache/dubbo/config/ReferenceConfig.java | 40 +- .../org/apache/dubbo/config/ServiceConfig.java | 5 +- .../dubbo/config/bootstrap/DubboBootstrap.java | 8 +- .../dubbo/config/utils/ConfigValidationUtils.java | 14 +- .../apache/dubbo/config/AbstractConfigTest.java| 15 +- .../ReferenceAnnotationBeanPostProcessor.java | 73 ++- .../annotation/ServiceClassPostProcessor.java | 4 +- .../context/DubboBootstrapApplicationListener.java | 7 + ...bboBootstrapStartStopListenerSpringAdapter.java | 2 +- ...DubboLifecycleComponentApplicationListener.java | 4 +- .../properties/DefaultDubboConfigBinder.java | 22 + .../spring/schema/DubboBeanDefinitionParser.java | 4 +- .../config/spring/util/DubboAnnotationUtils.java | 2 +- .../ReferenceAnnotationBeanPostProcessorTest.java | 32 +- .../annotation/ReferenceBeanBuilderTest.java | 4 +- .../META-INF/spring/dubbo-generic-consumer.xml | 4 +- .../spring/dubbo-nacos-consumer-context.xml| 12 +- .../spring/dubbo-nacos-provider-context.xml| 6 +- .../apollo/ApolloDynamicConfigurationTest.java | 17 +- .../support/apollo/EmbeddedApolloJunit5.java | 194
[dubbo] 19/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 6bdea3fe0f8b12973331fb351188c9771606beb0 Merge: 22f0dc273d ff50f916a8 Author: Xin Wang AuthorDate: Fri May 21 11:35:55 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' dubbo-all/pom.xml | 8 + dubbo-cluster/pom.xml | 6 + .../org/apache/dubbo/rpc/cluster/RouterChain.java | 4 +- .../rpc/cluster/directory/AbstractDirectory.java | 4 +- .../dubbo/rpc/cluster/router/address/Address.java | 35 +- .../router/address/AddressInvokersSelector.java| 58 +++ .../router/address/AddressRouterFactory.java | 21 +- .../cluster/router/condition/ConditionRouter.java | 8 +- .../rpc/cluster/support/BroadcastCluster2.java | 66 +-- .../cluster/support/BroadcastCluster2Invoker.java | 180 +++ .../dubbo/rpc/cluster/support/BroadcastResult.java | 99 .../internal/org.apache.dubbo.rpc.cluster.Cluster | 1 + .../org.apache.dubbo.rpc.cluster.RouterFactory | 1 + .../dubbo/rpc/cluster/router/MockInvoker.java | 6 + .../cluster/router/address/AddressRouterTest.java | 50 ++ .../src/main/java/org/apache/dubbo/common/URL.java | 12 +- .../java/org/apache/dubbo/common/URLBuilder.java | 4 +- .../dubbo/common/constants/CommonConstants.java| 2 + .../dubbo/common/constants/RegistryConstants.java | 2 - .../extension/support/ActivateComparator.java | 15 +- .../org/apache/dubbo/config/AbstractConfig.java| 2 + .../apache/dubbo/config/MetadataReportConfig.java | 14 + .../java/org/apache/dubbo/config/MethodConfig.java | 26 +- .../apache/dubbo/rpc/support/ProtocolUtils.java| 7 + .../org/apache/dubbo/common/URLBuilderTest.java| 44 ++ .../test/java/org/apache/dubbo/common/URLTest.java | 21 +- .../extension/support/ActivateComparatorTest.java | 26 + .../common/extension/support/Order0Filter0.java| 30 +- .../common/extension/support/Order0Filter1.java| 30 +- .../common/extension/support/Order0Filter2.java| 30 +- .../java/com/alibaba/dubbo/rpc/RpcInvocation.java | 7 +- .../org/apache/dubbo/config/ServiceConfig.java | 82 ++- .../dubbo/config/MetadataReportConfigTest.java | 28 +- .../org/apache/dubbo/config/MethodConfigTest.java | 15 +- .../apache/dubbo/config/ReferenceConfigTest.java | 11 +- .../AnnotatedInterfaceConfigBeanBuilder.java | 7 + .../ReferenceAnnotationBeanPostProcessor.java | 14 +- .../factory/annotation/ReferenceBeanBuilder.java | 18 + .../context/DubboBootstrapApplicationListener.java | 3 +- ...DubboLifecycleComponentApplicationListener.java | 1 - .../annotation/DubboComponentScanRegistrar.java| 12 +- .../spring/extension/SpringExtensionFactory.java | 3 + .../spring/schema/DubboNamespaceHandler.java | 2 +- .../src/main/resources/META-INF/dubbo.xsd | 5 + .../dubbo/config/spring/api/MethodCallback.java| 75 ++- ...eferencePostProcessAfterInitializationTest.java | 96 .../annotation/MethodConfigCallbackTest.java | 81 +++ .../config/spring/impl/MethodCallbackImpl.java | 115 ++--- .../support/nacos/NacosDynamicConfiguration.java | 6 - .../nacos/NacosDynamicConfigurationFactory.java| 6 +- .../support/zookeeper/CacheListener.java | 7 +- dubbo-dependencies-bom/pom.xml | 15 +- .../dubbo-dependencies-zookeeper/pom.xml | 2 +- .../dubbo/cache/support/AbstractCacheFactory.java | 25 +- .../metadata/definition/TypeDefinitionBuilder.java | 5 - .../definition/builder/DefaultTypeBuilder.java | 18 +- .../report/support/AbstractMetadataReport.java | 34 +- .../metadata/store/nacos/NacosMetadataReport.java | 70 ++- .../store/nacos/NacosMetadataReportFactory.java| 10 +- .../zookeeper/ZookeeperMetadataReportTest.java | 556 +++-- .../registry/client/AbstractServiceDiscovery.java | 4 +- .../registry/client/DefaultServiceInstance.java| 4 +- .../client/EventPublishingServiceDiscovery.java| 10 +- .../dubbo/registry/client/InstanceAddressURL.java | 4 + .../registry/client/ServiceDiscoveryRegistry.java | 3 + .../client/ServiceDiscoveryRegistryDirectory.java | 3 +- .../listener/ServiceInstancesChangedListener.java | 10 +- .../client/migration/MigrationInvoker.java | 7 +- .../client/migration/MigrationRuleHandler.java | 2 - .../registry/integration/DynamicDirectory.java | 7 +- .../registry/integration/RegistryDirectory.java| 72 +-- .../registry/integration/RegistryProtocol.java | 19 +- .../dubbo/registry/nacos/NacosRegistryFactory.java | 11 +- .../nacos/util/NacosNamingServiceUtils.java| 3 + .../zookeeper/ZookeeperServiceDiscovery.java | 10 +
[dubbo] 31/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 6eaa230fa2f96629ebb810e9460381ea89d981ad Merge: 857056034b 4c8a54ecff Author: Xin Wang AuthorDate: Thu Aug 26 09:11:23 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .github/workflows/build-and-test.yml | 34 +- .travis.yml| 20 +- CONTRIBUTING.md| 19 +- Jenkinsfile| 30 +- NOTICE | 8 - PULL_REQUEST_TEMPLATE.md | 15 +- README.md | 17 +- SECURITY.md| 6 +- dubbo-all/pom.xml | 40 +- dubbo-bom/pom.xml | 64 +++ dubbo-cluster/pom.xml | 12 + .../java/org/apache/dubbo/rpc/cluster/Cluster.java | 6 +- .../apache/dubbo/rpc/cluster/ClusterInvoker.java | 2 +- .../org/apache/dubbo/rpc/cluster/Constants.java| 4 + .../{support => }/ProviderURLMergeProcessor.java | 18 +- .../org/apache/dubbo/rpc/cluster/RouterChain.java | 4 +- .../cluster/configurator/AbstractConfigurator.java | 39 +- .../cluster/configurator/parser/ConfigParser.java | 45 +- .../rpc/cluster/directory/AbstractDirectory.java | 8 +- .../ConsumerContextClusterInterceptor.java | 5 +- .../interceptor/ZoneAwareClusterInterceptor.java | 7 +- .../loadbalance/ShortestResponseLoadBalance.java | 2 +- .../dubbo/rpc/cluster/router/address/Address.java | 24 +- .../router/address/AddressInvokersSelector.java| 58 +++ .../AddressRouterFactory.java} | 73 +-- .../cluster/router/condition/ConditionRouter.java | 65 ++- .../router/condition/ConditionRouterFactory.java | 2 +- .../config/model/ConditionRuleParser.java | 14 +- .../rpc/cluster/router/script/ScriptRouter.java| 47 +- .../dubbo/rpc/cluster/router/tag/TagRouter.java| 14 +- .../cluster/router/tag/model/TagRuleParser.java| 19 +- ...{ForkingCluster.java => BroadcastCluster2.java} | 8 +- .../cluster/support/BroadcastCluster2Invoker.java | 180 +++ .../cluster/support/BroadcastClusterInvoker.java | 2 +- .../dubbo/rpc/cluster/support/BroadcastResult.java | 99 .../dubbo/rpc/cluster/support/ClusterUtils.java| 110 +--- .../dubbo/rpc/cluster/support/FailbackCluster.java | 2 +- .../dubbo/rpc/cluster/support/FailfastCluster.java | 2 +- .../dubbo/rpc/cluster/support/FailoverCluster.java | 2 +- .../cluster/support/FailoverClusterInvoker.java| 20 +- .../dubbo/rpc/cluster/support/FailsafeCluster.java | 2 +- .../dubbo/rpc/cluster/support/ForkingCluster.java | 2 +- .../cluster/support/MergeableClusterInvoker.java | 8 +- .../DefaultProviderURLMergeProcessor.java} | 264 +- .../support/migration/MigrationClusterInvoker.java | 4 +- .../cluster/support/migration/MigrationRule.java | 37 +- .../cluster/support/registry/ZoneAwareCluster.java | 2 +- .../support/registry/ZoneAwareClusterInvoker.java | 105 ++-- .../internal/org.apache.dubbo.rpc.cluster.Cluster | 1 + ...che.dubbo.rpc.cluster.ProviderURLMergeProcessor | 1 + .../org.apache.dubbo.rpc.cluster.RouterFactory | 2 +- .../configurator/parser/ConfigParserTest.java | 12 +- .../ConsumerContextClusterInterceptorTest.java | 107 .../ZoneAwareClusterInterceptorTest.java | 97 .../loadbalance/RoundRobinLoadBalanceTest.java | 3 +- .../dubbo/rpc/cluster/router/MockInvoker.java | 6 + .../dubbo/rpc/cluster/router/TagRouterTest.java| 2 +- .../cluster/router/address/AddressRouterTest.java | 50 ++ .../router/condition/ConditionRouterTest.java | 35 +- .../rpc/cluster/support/ClusterUtilsTest.java | 4 + .../support/FailoverClusterInvokerTest.java| 28 ++ .../support/MergeableClusterInvokerTest.java | 3 +- .../internal/org.apache.dubbo.rpc.ZoneDetector | 1 + .../org.apache.dubbo.rpc.cluster.RouterFactory | 1 + .../cluster/router/file/availablerule.javascript | 17 +- .../rpc/cluster/router/file/methodrule.javascript | 17 +- .../router/file/notAvailablerule.javascript| 17 +- .../alibaba/dubbo/config/annotation/Reference.java | 7 +- .../alibaba/dubbo/config/annotation/Service.java | 7 +- .../apache/dubbo/common/BaseServiceMetadata.java | 17 +- .../java/org/apache/dubbo/common/Parameters.java | 8 +- .../src/main/java/org/apache/dubbo/common/URL.java | 47 +- .../java/org/apache/dubbo/common/URLBuilder.java | 4 +- .../java/org/apache/dubbo/common/URLStrParser.java | 36 +- .../main/java/org/apache/dubbo/common/Version.java | 7 +-
[dubbo] 35/36: Merge branch 'master' of https://github.com/lovepoem/dubbo
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 96292bc07b45acce266a240e213c307ac47c6471 Merge: a3a578f9ba d8e7b53f01 Author: Xin Wang AuthorDate: Tue May 16 17:12:53 2023 +0800 Merge branch 'master' of https://github.com/lovepoem/dubbo
[dubbo] 25/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit ad61a068f4aa9581763e984bee6c21efcf82d5fc Merge: 989ee68f6a daf6f25137 Author: Xin Wang AuthorDate: Tue Jul 13 16:18:43 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' dubbo-dependencies-bom/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-hessian/pom.xml| 5 ++ .../rpc/protocol/hessian/HessianProtocol.java | 4 +- .../serialize/hessian/Hessian2ObjectInput.java | 6 +- .../serialize/hessian/Hessian2ObjectOutput.java| 6 +- .../hessian/Hessian2SerializerFactory.java | 83 +--- .../serialize/hessian/Java8SerializerFactory.java | 88 -- .../dubbo/AbstractHessian2FactoryInitializer.java | 36 + .../dubbo/DefaultHessian2FactoryInitializer.java | 28 +++ .../hessian/dubbo/Hessian2FactoryInitializer.java | 43 +++ .../dubbo/WhitelistHessian2FactoryInitializer.java | 50 ...ialize.hessian.dubbo.Hessian2FactoryInitializer | 2 + .../serialize/hessian/Java8TimeSerializerTest.java | 4 +- 13 files changed, 253 insertions(+), 104 deletions(-)
[dubbo] 13/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 5068fb124d34ad62c3cb60fbbb66d3c235c05ae1 Merge: f9c174cd17 51d5a88a06 Author: Xin Wang AuthorDate: Tue Mar 2 09:21:56 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .gitattributes | 4 + README.md | 6 +- dubbo-cluster/pom.xml | 6 + .../rpc/cluster/directory/AbstractDirectory.java | 18 +- .../rpc/cluster/directory/StaticDirectory.java | 2 +- .../dubbo/rpc/cluster/router/tag/TagRouter.java| 3 - .../cluster/support/BroadcastClusterInvoker.java | 61 ++- .../support/registry/ZoneAwareClusterInvoker.java | 5 +- .../support/wrapper/MockClusterInvoker.java| 4 +- .../loadbalance/RoundRobinLoadBalanceTest.java | 8 +- .../apache/dubbo/common/BaseServiceMetadata.java | 4 +- .../java/org/apache/dubbo/common/Parameters.java | 3 + .../src/main/java/org/apache/dubbo/common/URL.java | 5 + .../java/org/apache/dubbo/common/URLStrParser.java | 21 +- .../dubbo/common/bytecode/ClassGenerator.java | 4 +- .../common/bytecode/CustomizedLoaderClassPath.java | 3 +- .../dubbo/common/compiler/support/ClassUtils.java | 4 +- .../config/configcenter/ConfigChangedEvent.java| 8 +- .../common/config/configcenter/Constants.java | 1 + .../configcenter/TreePathDynamicConfiguration.java | 2 +- .../dubbo/common/constants/CommonConstants.java| 2 + .../dubbo/common/constants/RegistryConstants.java | 2 + .../dubbo/common/extension/ExtensionLoader.java| 36 +- .../org/apache/dubbo/common/extension/Wrapper.java | 4 + .../org/apache/dubbo/common/json/J2oVisitor.java | 8 +- .../org/apache/dubbo/common/lang/Prioritized.java | 2 +- .../dubbo/common/threadlocal/InternalRunnable.java | 53 +++ .../threadlocal/NamedInternalThreadFactory.java| 2 +- .../manager/DefaultExecutorRepository.java | 51 ++- .../threadpool/manager/ExecutorRepository.java | 4 + .../threadpool/support/AbortPolicyWithReport.java | 23 +- .../org/apache/dubbo/common/utils/ArrayUtils.java | 6 +- .../apache/dubbo/common/utils/CollectionUtils.java | 4 +- .../dubbo/common/utils/CompatibleTypeUtils.java| 452 +++-- .../apache/dubbo/common/utils/ExecutorUtil.java| 8 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 6 +- .../apache/dubbo/common/utils/ReflectUtils.java| 8 +- .../dubbo/config/AbstractInterfaceConfig.java | 77 +++- .../dubbo/config/AbstractReferenceConfig.java | 22 - .../apache/dubbo/config/ReferenceConfigBase.java | 38 +- .../org/apache/dubbo/config/ServiceConfigBase.java | 64 +-- .../config/context/ConfigConfigurationAdapter.java | 2 +- .../dubbo/common/BaseServiceMetadataTest.java | 3 +- .../file/FileSystemDynamicConfigurationTest.java | 5 +- .../common/extension/ExtensionLoaderTest.java | 2 +- .../dubbo/common/extension/wrapper/Demo.java} | 8 +- .../common/extension/wrapper/WrapperTest.java | 34 +- .../common/extension/wrapper/impl/DemoImpl.java| 13 +- .../common/extension/wrapper/impl/DemoWrapper.java | 20 +- .../extension/wrapper/impl/DemoWrapper2.java | 22 +- .../threadpool/manager/ExecutorRepositoryTest.java | 2 - .../support/AbortPolicyWithReportTest.java | 58 ++- .../common/utils/CompatibleTypeUtilsTest.java | 4 +- .../apache/dubbo/common/utils/PojoUtilsTest.java | 5 + .../dubbo/common/utils/ReflectUtilsTest.java | 34 +- .../org.apache.dubbo.common.extension.wrapper.Demo | 4 + .../dubbo/rpc/protocol/dubbo/FutureAdapter.java| 10 +- .../apache/dubbo/generic/GenericServiceTest.java | 24 ++ .../org/apache/dubbo/config/ReferenceConfig.java | 11 +- .../org/apache/dubbo/config/ServiceConfig.java | 6 +- .../dubbo/config/bootstrap/DubboBootstrap.java | 7 +- .../internal/org.apache.dubbo.event.EventListener | 3 +- ...g.apache.dubbo.metadata.MetadataServiceExporter | 1 - .../org/apache/dubbo/config/ServiceConfigTest.java | 1 + .../dubbo/config/bootstrap/rest/UserService.java | 1 - .../AbstractAnnotationConfigBeanBuilder.java | 9 +- .../AnnotatedInterfaceConfigBeanBuilder.java | 9 +- .../factory/annotation/ReferenceBeanBuilder.java | 3 +- .../annotation/ServiceClassPostProcessor.java | 5 - .../context/annotation/EnableDubboConfig.java | 5 +- .../spring/extension/SpringExtensionFactory.java | 7 +- .../dubbo/config/spring/util/DubboBeanUtils.java | 87 +++- .../annotation/ReferenceBeanBuilderTest.java | 2 +- .../support/apollo/ApolloDynamicConfiguration.java | 2 +- .../support/etcd/EtcdDynamicConfiguration.java | 2 +- .../main/resources/META-INF/assembly/bin/start.sh
[dubbo] 27/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 2f9115f1e41b71fe65803e6444cb3045086e3c1b Merge: 17e86ce500 41e989b853 Author: Xin Wang AuthorDate: Mon Jul 26 17:59:48 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .../dubbo/rpc/cluster/loadbalance/ShortestResponseLoadBalance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[dubbo] 18/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 22f0dc273d98aff6b8bb35bbe8fe9d69958a39f6 Merge: d036b01248 f29663bba6 Author: Xin Wang AuthorDate: Mon May 10 20:06:52 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .github/workflows/build-and-test.yml | 2 +- .travis.yml| 30 ++ CONTRIBUTING.md| 17 +++ README.md | 1 + .../org/apache/dubbo/rpc/cluster/Constants.java| 4 + .../cluster/configurator/parser/ConfigParser.java | 1 - .../rpc/cluster/directory/AbstractDirectory.java | 4 + .../cluster/router/condition/ConditionRouter.java | 51 + .../dubbo/rpc/cluster/support/ClusterUtils.java| 32 +++--- .../router/condition/ConditionRouterTest.java | 35 +- .../alibaba/dubbo/config/annotation/Reference.java | 7 +- .../alibaba/dubbo/config/annotation/Service.java | 7 +- .../org/apache/dubbo/common/bytecode/Proxy.java| 5 +- .../org/apache/dubbo/common/bytecode/Wrapper.java | 24 - .../dubbo/common/compiler/support/JdkCompiler.java | 34 -- .../dubbo/common/constants/ClusterRules.java | 63 +++ .../dubbo/common/constants/CommonConstants.java| 9 ++ .../constants/ConsulConstants.java}| 22 ++-- .../dubbo/common/constants/LoadbalanceRules.java | 51 + .../dubbo/common/extension/ExtensionLoader.java| 3 + .../org/apache/dubbo/common/utils/FieldUtils.java | 5 + .../org/apache/dubbo/common/utils/MethodUtils.java | 4 + .../org/apache/dubbo/common/utils/NetUtils.java| 4 +- .../org/apache/dubbo/config/AbstractConfig.java| 15 ++- .../org/apache/dubbo/config/ApplicationConfig.java | 13 --- .../org/apache/dubbo/config/ConsumerConfig.java| 19 +--- .../java/org/apache/dubbo/config/ModuleConfig.java | 13 --- .../org/apache/dubbo/config/MonitorConfig.java | 13 --- .../org/apache/dubbo/config/ProtocolConfig.java| 13 --- .../org/apache/dubbo/config/ProviderConfig.java| 11 +- .../apache/dubbo/config/ReferenceConfigBase.java | 10 ++ .../org/apache/dubbo/config/RegistryConfig.java| 13 --- .../org/apache/dubbo/config/ServiceConfigBase.java | 8 ++ .../dubbo/config/annotation/DubboReference.java| 12 +-- .../dubbo/config/annotation/DubboService.java | 14 +-- .../apache/dubbo/config/annotation/Reference.java | 13 +-- .../apache/dubbo/config/annotation/Service.java| 14 +-- .../apache/dubbo/config/context/ConfigManager.java | 13 +++ .../apache/dubbo/event/DirectEventDispatcher.java | 1 + .../org/apache/dubbo/event/EventDispatcher.java| 2 +- .../dubbo/event/ParallelEventDispatcher.java | 1 + .../apache/dubbo/rpc/model/ApplicationModel.java | 1 + .../common/compiler/support/JdkCompilerTest.java | 31 ++ .../common/extension/ExtensionLoaderTest.java | 4 + .../apache/dubbo/common/utils/NetUtilsTest.java| 2 +- .../java/com/alibaba/dubbo/rpc/RpcInvocation.java | 7 +- dubbo-config/dubbo-config-api/pom.xml | 5 + .../org/apache/dubbo/config/ServiceConfig.java | 76 ++--- .../dubbo/config/bootstrap/DubboBootstrap.java | 95 ++--- .../bootstrap/builders/ReferenceBuilder.java | 6 +- .../config/bootstrap/builders/ServiceBuilder.java | 8 +- .../dubbo/config/AbstractInterfaceConfigTest.java | 6 +- .../apache/dubbo/config/ReferenceConfigTest.java | 33 -- .../org/apache/dubbo/config/ServiceConfigTest.java | 87 ++- .../PublishingServiceDefinitionListenerTest.java | 15 ++- .../config/url/ExporterSideConfigUrlTest.java | 6 +- .../dubbo/config/url/InvokerSideConfigUrlTest.java | 2 + dubbo-config/dubbo-config-spring/pom.xml | 13 +++ ...onfigDefaultPropertyValueBeanPostProcessor.java | 11 +- .../ReferenceAnnotationBeanPostProcessorTest.java | 16 +-- .../ServiceAnnotationBeanPostProcessorTest.java| 9 +- .../annotation/ServiceClassPostProcessorTest.java | 6 +- .../MultipleServicesWithMethodConfigsTest.java | 4 +- .../DubboComponentScanRegistrarTest.java | 3 +- .../spring/context/annotation/EnableDubboTest.java | 6 +- .../spring/schema/DubboNamespaceHandlerTest.java | 18 +++- .../config/spring/schema/GenericServiceTest.java | 6 +- .../spring/multiple-services-with-methods.xml | 4 +- .../demo-provider-duplicate-service-bean.xml} | 81 +++--- .../dubbo-configcenter-consul/pom.xml | 1 + .../consul/ConsulDynamicConfiguration.java | 13 +-- .../support/nacos/NacosDynamicConfiguration.java | 30 +++--- .../zookeeper/ZookeeperDynamicConfiguration.java | 18 +++- .../dubbo-demo-xml/dubbo-demo-xml-provider/pom.xml | 4 -
[dubbo] 11/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 85deac049023607c3a3a069d7ef9595d7501410f Merge: 443876c66b 15fc5b473b Author: Xin Wang AuthorDate: Wed Feb 24 19:26:14 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .gitattributes | 4 + .github/workflows/build-and-test.yml | 185 +++ .github/workflows/unit-test.yml| 67 --- Jenkinsfile| 6 +- NOTICE | 2 +- README.md | 20 +- dubbo-all/pom.xml | 14 + dubbo-bom/pom.xml | 10 + .../org/apache/dubbo/rpc/cluster/Directory.java| 2 + .../rpc/cluster/directory/AbstractDirectory.java | 23 +- .../rpc/cluster/directory/StaticDirectory.java | 2 +- .../dubbo/rpc/cluster/router/tag/TagRouter.java| 3 - .../cluster/support/BroadcastClusterInvoker.java | 61 ++- .../migration/MigrationClusterComparator.java | 14 +- .../support/migration/MigrationClusterInvoker.java | 54 ++ .../cluster/support/migration/MigrationRule.java | 90 .../cluster/support/migration/MigrationStep.java | 9 +- .../support/registry/ZoneAwareClusterInvoker.java | 168 +- .../cluster/support/wrapper/AbstractCluster.java | 2 +- .../support/wrapper/MockClusterInvoker.java| 4 +- .../loadbalance/RoundRobinLoadBalanceTest.java | 8 +- .../support/migration/MigrationRuleTest.java | 14 +- .../apache/dubbo/common/BaseServiceMetadata.java | 6 +- .../java/org/apache/dubbo/common/Parameters.java | 3 + .../src/main/java/org/apache/dubbo/common/URL.java | 5 + .../java/org/apache/dubbo/common/URLStrParser.java | 23 +- .../dubbo/common/bytecode/ClassGenerator.java | 4 +- .../common/bytecode/CustomizedLoaderClassPath.java | 3 +- .../dubbo/common/compiler/support/ClassUtils.java | 4 +- .../common/config/CompositeConfiguration.java | 14 +- .../dubbo/common/config/ConfigurationUtils.java| 12 + .../apache/dubbo/common/config/Environment.java| 23 +- .../config/configcenter/ConfigChangedEvent.java| 8 +- .../dubbo/common/constants/RegistryConstants.java | 11 +- .../dubbo/common/extension/ExtensionLoader.java| 36 +- .../org/apache/dubbo/common/json/J2oVisitor.java | 8 +- .../org/apache/dubbo/common/lang/Prioritized.java | 2 +- .../dubbo/common/threadlocal/InternalRunnable.java | 53 ++ .../threadlocal/NamedInternalThreadFactory.java| 2 +- .../common/threadpool/ThreadlessExecutor.java | 27 +- .../manager/DefaultExecutorRepository.java | 51 +- .../threadpool/manager/ExecutorRepository.java | 4 + .../threadpool/support/AbortPolicyWithReport.java | 23 +- .../org/apache/dubbo/common/utils/ArrayUtils.java | 6 +- .../apache/dubbo/common/utils/CollectionUtils.java | 4 +- .../dubbo/common/utils/CompatibleTypeUtils.java| 452 .../apache/dubbo/common/utils/ExecutorUtil.java| 8 +- .../org/apache/dubbo/common/utils/LFUCache.java| 6 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 6 +- .../apache/dubbo/common/utils/ReflectUtils.java| 8 +- .../dubbo/config/AbstractInterfaceConfig.java | 88 +++- .../dubbo/config/AbstractReferenceConfig.java | 22 - .../org/apache/dubbo/config/ApplicationConfig.java | 12 + .../apache/dubbo/config/ReferenceConfigBase.java | 38 +- .../org/apache/dubbo/config/ServiceConfigBase.java | 64 +-- .../dubbo/common/BaseServiceMetadataTest.java | 65 +++ .../org/apache/dubbo/common/URLStrParserTest.java | 58 +- .../file/FileSystemDynamicConfigurationTest.java | 3 + .../common/extension/ExtensionLoaderTest.java | 2 +- .../common/threadpool/ThreadlessExecutorTest.java | 58 ++ .../threadpool/manager/ExecutorRepositoryTest.java | 77 +++ .../support/AbortPolicyWithReportTest.java | 58 +- .../dubbo/common/timer/HashedWheelTimerTest.java | 181 ++- .../common/utils/CompatibleTypeUtilsTest.java | 4 +- .../apache/dubbo/common/utils/DefaultPageTest.java | 9 +- .../org/apache/dubbo/common/utils/LogTest.java | 55 +- .../apache/dubbo/common/utils/MemberUtilsTest.java | 12 + .../apache/dubbo/common/utils/MethodUtilsTest.java | 54 ++ .../apache/dubbo/common/utils/PojoUtilsTest.java | 5 + .../dubbo/common/utils/ReflectUtilsTest.java | 34 +- .../dubbo/rpc/protocol/dubbo/FutureAdapter.java| 10 +- .../apache/dubbo/generic/GenericServiceTest.java | 24 + .../org/apache/dubbo/config/ReferenceConfig.java | 11 +- .../org/apache/dubbo/config/ServiceConfig.java | 6 +- .../dubbo/config/bootstrap/DubboBootstrap.java | 20 +-
[dubbo] 02/36: Merge remote-tracking branch 'dubbo_rem/master' into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 39b274e47509b8d28623c5439454301ddd964008 Merge: 537682b8cf 8d06e5e916 Author: Xin Wang AuthorDate: Tue Oct 13 13:57:38 2020 +0800 Merge remote-tracking branch 'dubbo_rem/master' into master .../java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java| 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)
[dubbo] 15/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 155cf6122632bdcb6cda7c54bed1beb832aaf0e9 Merge: 5785b95fe2 eef6b450fc Author: Xin Wang AuthorDate: Fri Mar 5 09:25:08 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .github/workflows/build-and-test.yml | 14 +++--- .../cluster/router/condition/ConditionRouter.java | 6 +- .../router/condition/ConditionRouterFactory.java | 2 +- .../dubbo/config/bootstrap/DubboBootstrap.java | 2 +- .../annotation/ServiceClassPostProcessor.java | 5 + .../store/InMemoryWritableMetadataService.java | 21 +++-- .../registry/support/AbstractRegistryFactory.java | 20 ++-- .../apache/dubbo/registry/nacos/NacosRegistry.java | 8 +--- .../registry/nacos/NacosServiceDiscovery.java | 7 +++ .../nacos/util/NacosNamingServiceUtils.java| 22 ++ .../zookeeper/ZookeeperServiceDiscovery.java | 3 ++- .../dubbo/rpc/protocol/AbstractExporter.java | 9 - .../dubbo/rpc/protocol/AbstractProxyProtocol.java | 3 +-- .../dubbo/rpc/protocol/ProtocolFilterWrapper.java | 3 ++- .../dubbo/rpc/protocol/dubbo/DubboExporter.java| 3 +-- .../rpc/protocol/grpc/DubboHandlerRegistry.java| 9 ++--- .../dubbo/rpc/protocol/injvm/InjvmExporter.java| 3 +-- 17 files changed, 103 insertions(+), 37 deletions(-)
[dubbo] 16/36: Merge remote-tracking branch 'dubbo_rem/master'
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit f63a8bb665fba108ffe32bdbaa24cf6571b1bdc1 Merge: 155cf61226 b5c81d8558 Author: Xin Wang AuthorDate: Sat Mar 20 13:51:55 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' .travis.yml| 22 -- Jenkinsfile| 30 README.md | 2 +- .../java/org/apache/dubbo/rpc/cluster/Cluster.java | 6 +- .../dubbo/rpc/cluster/router/tag/TagRouter.java| 14 +--- .../cluster/support/MergeableClusterInvoker.java | 8 +-- .../loadbalance/RoundRobinLoadBalanceTest.java | 3 +- .../src/main/java/org/apache/dubbo/common/URL.java | 21 -- .../common/beanutil/JavaBeanSerializeUtil.java | 4 +- .../org/apache/dubbo/common/bytecode/Proxy.java| 53 +++--- .../dubbo/common/constants/CommonConstants.java| 5 ++ .../org/apache/dubbo/common/json/J2oVisitor.java | 5 +- .../common/threadlocal/InternalThreadLocal.java| 2 +- .../apache/dubbo/common/utils/CollectionUtils.java | 39 +- .../org/apache/dubbo/common/utils/FieldUtils.java | 14 ++-- .../org/apache/dubbo/common/utils/IOUtils.java | 38 ++ .../org/apache/dubbo/common/utils/LFUCache.java| 15 ++-- .../org/apache/dubbo/common/utils/MethodUtils.java | 7 +- .../org/apache/dubbo/common/utils/NetUtils.java| 6 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 13 ++-- .../apache/dubbo/common/utils/ReflectUtils.java| 84 ++ .../org/apache/dubbo/common/utils/UrlUtils.java| 18 + .../apache/dubbo/config/ConfigCenterConfig.java| 2 +- .../java/org/apache/dubbo/config/SslConfig.java| 28 .../org/apache/dubbo/rpc/model/ProviderModel.java | 3 +- .../apache/dubbo/rpc/model/ServiceDescriptor.java | 3 +- .../common/PojoUtilsForNonPublicStaticTest.java| 35 - .../test/java/org/apache/dubbo/common/URLTest.java | 82 + .../dubbo/common/bytecode/ClassGeneratorTest.java | 8 ++- .../config/EnvironmentConfigurationTest.java | 12 ++-- .../configcenter/ConfigChangedEventTest.java | 30 .../support/AbortPolicyWithReportTest.java | 7 +- .../support/cached/CachedThreadPoolTest.java | 13 ++-- .../support/eager/EagerThreadPoolExecutorTest.java | 17 ++--- .../support/eager/EagerThreadPoolTest.java | 13 ++-- .../dubbo/common/utils/CollectionUtilsTest.java| 2 +- .../apache/dubbo/common/utils/ConfigUtilsTest.java | 2 +- .../apache/dubbo/common/utils/LFUCacheTest.java| 21 -- .../dubbo/common/utils/ReflectUtilsTest.java | 37 +++--- .../org/apache/dubbo/echo/EchoServiceTest.java | 2 +- .../org/apache/dubbo/config/ServiceConfig.java | 1 + .../dubbo/config/bootstrap/DubboBootstrap.java | 36 +- .../apache/dubbo/config/AbstractConfigTest.java| 7 +- .../dubbo/config/mock/MockServiceDiscovery.java| 19 ++--- .../config/spring/status/SpringStatusChecker.java | 5 +- .../dubbo/config/spring/SimpleRegistryService.java | 5 +- .../spring/registry/MockRegistryFactory.java | 8 +-- .../spring/registry/MockServiceDiscovery.java | 19 ++--- .../support/nacos/NacosDynamicConfiguration.java | 3 +- .../metadata/test/JTestMetadataReport4Test.java| 5 -- .../store/consul/ConsulMetadataReport.java | 3 - .../metadata/store/etcd/EtcdMetadataReport.java| 4 -- .../store/failover/FailoverMetadataReportTest.java | 5 +- .../metadata/store/nacos/NacosMetadataReport.java | 6 +- .../metadata/store/redis/RedisMetadataReport.java | 3 - .../store/zookeeper/ZookeeperMetadataReport.java | 4 -- .../org/apache/dubbo/qos/command/impl/Ready.java | 67 - .../registry/client/AbstractServiceDiscovery.java | 23 +- .../client/DefaultRegistryClusterIdentifier.java | 3 +- .../client/FileSystemServiceDiscovery.java | 15 ++-- .../dubbo/registry/client/ServiceDiscovery.java| 12 ++-- .../registry/client/ServiceDiscoveryRegistry.java | 8 +-- .../event/listener/LoggingEventListener.java | 4 +- .../metadata/MetadataServiceNameMapping.java | 5 +- .../metadata/ServiceInstanceMetadataUtils.java | 4 ++ .../registry/client/InMemoryServiceDiscovery.java | 14 +--- .../registry/consul/ConsulServiceDiscovery.java| 4 +- .../apache/dubbo/registry/dubbo/DubboRegistry.java | 4 -- .../registry/dubbo/RegistryDirectoryTest.java | 3 +- .../registry/dubbo/SimpleRegistryService.java | 5 +- .../apache/dubbo/registry/etcd/EtcdRegistry.java | 4 -- .../dubbo/registry/etcd/EtcdServiceDiscovery.java | 6 +- .../registry/eureka/EurekaServiceDiscovery.java| 4 +- .../registry/multicast/MulticastRegistry.java | 5 --
[dubbo] 08/36: Merge branch 'master' of https://github.com/lovepoem/dubbo into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit fe15c3e9bf54dca1607d01e8cce35878b3b4120d Merge: 61407ac342 443876c66b Author: Xin Wang AuthorDate: Tue Jan 19 18:17:43 2021 +0800 Merge branch 'master' of https://github.com/lovepoem/dubbo into master
[dubbo] 01/36: Merge remote-tracking branch 'dubbo_rem/master' into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 537682b8cf0fd4ed1f7493478b54047ea3aa40f3 Merge: da504f6462 f9f10ba522 Author: Xin Wang AuthorDate: Tue Oct 13 11:19:45 2020 +0800 Merge remote-tracking branch 'dubbo_rem/master' into master .../org/apache/dubbo/config/ProtocolConfig.java| 55 + .../org/apache/dubbo/config/ProviderConfig.java| 44 ++ dubbo-config/dubbo-config-spring/pom.xml | 6 -- .../src/main/resources/META-INF/compat/dubbo.xsd | 10 +++ .../src/main/resources/META-INF/dubbo.xsd | 10 +++ .../org/apache/dubbo/config/spring/ConfigTest.java | 32 .../AnnotationPropertyValuesAdapterTest.java | 80 +- .../annotation/DubboReferenceGenericTest.java | 11 ++- .../factory/annotation/MergedAnnotationTest.java | 20 ++--- .../ReferenceAnnotationBeanPostProcessorTest.java | 73 .../annotation/ReferenceBeanBuilderTest.java | 96 +++--- .../ServiceAnnotationBeanPostProcessorTest.java| 33 .../annotation/ServiceBeanNameBuilderTest.java | 16 ++-- .../annotation/ServiceClassPostProcessorTest.java | 32 .../MultipleServicesWithMethodConfigsTest.java | 8 +- .../config/YamlPropertySourceFactoryTest.java | 22 ++--- .../context/annotation/EnableDubboConfigTest.java | 3 +- .../properties/DefaultDubboConfigBinderTest.java | 17 ++-- .../registry/nacos/nacos/NacosServiceNameTest.java | 4 +- .../config/spring/schema/GenericServiceTest.java | 20 ++--- .../spring/status/SpringStatusCheckerTest.java | 4 +- dubbo-dependencies-bom/pom.xml | 3 +- .../main/java/org/apache/dubbo/rpc/RpcStatus.java | 17 +++- .../org/apache/dubbo/rpc/filter/TokenFilter.java | 4 +- pom.xml| 2 +- 25 files changed, 369 insertions(+), 253 deletions(-)
[dubbo] 07/36: Merge remote-tracking branch 'dubbo_rem/master' into master
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 61407ac34229fe82384f482e5d773cfb677a4b8c Merge: 339d23453e 594a68fd71 Author: Xin Wang AuthorDate: Tue Jan 19 18:17:23 2021 +0800 Merge remote-tracking branch 'dubbo_rem/master' into master .github/workflows/unit-test.yml| 67 README.md | 34 ++-- .../cluster/support/wrapper/AbstractCluster.java | 2 +- .../apache/dubbo/common/BaseServiceMetadata.java | 6 +- .../java/org/apache/dubbo/common/URLStrParser.java | 2 +- .../org/apache/dubbo/common/bytecode/Wrapper.java | 6 +- .../common/threadpool/ThreadlessExecutor.java | 27 ++- .../org/apache/dubbo/common/utils/LFUCache.java| 6 +- .../org/apache/dubbo/common/utils/PojoUtils.java | 8 +- .../dubbo/common/BaseServiceMetadataTest.java | 65 .../org/apache/dubbo/common/URLStrParserTest.java | 58 ++- .../dubbo/common/model/SerializablePerson.java | 5 +- .../common/threadpool/ThreadlessExecutorTest.java | 58 +++ .../threadpool/manager/ExecutorRepositoryTest.java | 79 + .../dubbo/common/timer/HashedWheelTimerTest.java | 181 + .../apache/dubbo/common/utils/DefaultPageTest.java | 9 +- .../org/apache/dubbo/common/utils/LogTest.java | 55 +-- .../apache/dubbo/common/utils/MemberUtilsTest.java | 12 ++ .../apache/dubbo/common/utils/MethodUtilsTest.java | 54 ++ .../apache/dubbo/common/utils/PojoUtilsTest.java | 91 ++- .../dubbo/config/utils/ConfigValidationUtils.java | 24 ++- .../PublishingServiceDefinitionListenerTest.java | 1 + .../metadata/MetadataServiceExporterTest.java | 1 + .../org/apache/dubbo/config/spring/ConfigTest.java | 8 +- .../dubbo/config/spring/ServiceBeanTest.java | 2 + .../AnnotationPropertyValuesAdapterTest.java | 2 + .../annotation/DubboReferenceGenericTest.java | 3 + .../factory/annotation/MergedAnnotationTest.java | 2 + .../ReferenceAnnotationBeanPostProcessorTest.java | 3 + .../annotation/ReferenceBeanBuilderTest.java | 3 + .../ServiceAnnotationBeanPostProcessorTest.java| 3 + .../annotation/ServiceBeanNameBuilderTest.java | 4 +- .../annotation/ServiceClassPostProcessorTest.java | 3 + .../MultipleServicesWithMethodConfigsTest.java | 2 + .../config/YamlPropertySourceFactoryTest.java | 2 + .../DubboComponentScanRegistrarTest.java | 2 + .../annotation/DubboConfigConfigurationTest.java | 2 + .../context/annotation/EnableDubboConfigTest.java | 6 + .../spring/context/annotation/EnableDubboTest.java | 2 + .../annotation/consumer/ConsumerConfiguration.java | 2 +- .../annotation/provider/ProviderConfiguration.java | 6 +- .../properties/DefaultDubboConfigBinderTest.java | 3 + .../extension/SpringExtensionFactoryTest.java | 2 + .../dubbo/config/spring/issues/Issue6252Test.java | 2 + .../registry/nacos/nacos/NacosServiceNameTest.java | 4 +- .../spring/schema/DubboNamespaceHandlerTest.java | 12 ++ .../config/spring/schema/GenericServiceTest.java | 3 + .../spring/status/DataSourceStatusCheckerTest.java | 2 + .../spring/status/SpringStatusCheckerTest.java | 2 + .../src/main/resources/spring/dubbo-provider.xml | 2 +- .../annotation/processing/util/TypeUtilsTest.java | 2 + .../dubbo/monitor/dubbo/MetricsFilterTest.java | 60 --- .../apache/dubbo/registry/nacos/NacosRegistry.java | 6 +- .../apache/dubbo/registry/redis/RedisRegistry.java | 43 + .../support/command/StatusTelnetHandler.java | 4 +- .../org/apache/dubbo/remoting/MockTransporter.java | 27 ++- .../apache/dubbo/remoting/TransportersTest.java| 46 ++ .../dubbo/remoting/exchange/ExchangersTest.java| 58 +++ .../dubbo/remoting/exchange/MockExchanger.java | 31 ++-- .../dubbo/remoting/telnet/TelnetUtilsTest.java | 72 .../telnet/support/ClearTelnetHandlerTest.java | 46 ++ .../telnet/support/ExitTelnetHandlerTest.java | 27 +-- .../telnet/support/HelpTelnetHandlerTest.java | 48 ++ .../telnet/support/StatusTelnetHandlerTest.java| 44 + .../dubbo/remoting/utils/PayloadDropperTest.java | 43 + .../apache/dubbo/remoting/utils/UrlUtilsTest.java | 40 + .../internal/org.apache.dubbo.remoting.Transporter | 1 + .../org.apache.dubbo.remoting.exchange.Exchanger | 1 + .../rpc/protocol/dubbo/ArgumentCallbackTest.java | 14 +- 69 files changed, 1323 insertions(+), 230 deletions(-)
[dubbo] 03/36: merge
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git commit 2ddacd6f4f8d9755c74c3403e742c2bcfd72ad82 Merge: 39b274e475 4a8da59573 Author: wangxin813 AuthorDate: Fri Oct 16 14:11:48 2020 +0800 merge CONTRIBUTING.md| 42 ++-- README.md | 26 .../dubbo/remoting/transport/AbstractClient.java | 74 ++ 3 files changed, 81 insertions(+), 61 deletions(-)
[dubbo] branch master updated (e1a7991ab8 -> 1f84cdcfed)
This is an automated email from the ASF dual-hosted git repository. wangxin pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git from e1a7991ab8 Fix When serialization fails, the code value in org.apache.dubbo.rpc.RpcException is set incorrectly. (#12279) (#12280) add a6247c5247 remove not used import add e989044c82 Merge remote-tracking branch 'dubbo_remote/master' add 5e3da9f28c remove unused import add 14ec387cf4 Merge remote-tracking branch 'dubbo_remote/master' add 954353153f Merge remote-tracking branch 'dubbo_remote/master' add 8a7eb600d3 Merge remote-tracking branch 'dubbo_remote/master' add d8f5e9bdb8 Merge remote-tracking branch 'dubbo_remote/master' add eb7058935e Merge remote-tracking branch 'dubbo_remote/master' add 87467a6021 Merge remote-tracking branch 'dubbo_remote/master' add de5712cbf0 Merge remote-tracking branch 'dubbo_remote/master' add 735a9ff02d Merge remote-tracking branch 'dubbo_remote/master' add a78b635311 Merge remote-tracking branch 'dubbo_remote/master' add 5e2dc174f0 Merge remote-tracking branch 'dubbo_remote/master' add 93dde74847 Merge remote-tracking branch 'dubbo_remote/master' add 3d82a07a58 Merge remote-tracking branch 'dubbo_remote/master' add 00392e2c55 Merge remote-tracking branch 'dubbo_remote/master' add d3a76eb426 Merge remote-tracking branch 'dubbo_remote/master' add 005f1772ef Merge remote-tracking branch 'dubbo_remote/master' add a5c04b465e Merge remote-tracking branch 'dubbo_remote/master' add 478c8c504a Merge remote-tracking branch 'dubbo_remote/master' add dbf6502f75 Merge remote-tracking branch 'dubbo_remote/master' add b6ec0df7ec Merge remote-tracking branch 'dubbo_remote/master' add 957e7db01b Merge remote-tracking branch 'dubbo_remote/master' add 6986afbc4b Merge remote-tracking branch 'dubbo_remote/master' add 258857a879 Merge remote-tracking branch 'dubbo_remote/master' add 6ebc6853ca Merge remote-tracking branch 'dubbo_remote/master' add b24140df7a Merge remote-tracking branch 'dubbo_remote/master' add ed5fd8aa15 Merge remote-tracking branch 'dubbo_remote/master' add 507400abf6 Merge remote-tracking branch 'dubbo_remote/master' add 443e1507df Merge remote-tracking branch 'dubbo_remote/master' add affc976120 fix-3678 add 9bd5e1a789 Merge remote-tracking branch 'dubbo_remote/master' add c4f6f6533b Merge remote-tracking branch 'dubbo_remote/master' add ecbc6a2ed9 Merge remote-tracking branch 'dubbo_remote/master' add 32f26321eb Merge remote-tracking branch 'dubbo_remote/master' add 0811095867 Merge branch 'master' of https://github.com/lovepoem/dubbo add 3f68772879 Merge remote-tracking branch 'dubbo_remote/master' add ca96d234c0 Merge remote-tracking branch 'dubbo_remote/master' add df368b045a Merge remote-tracking branch 'dubbo_remote/master' add c8f237fa40 Merge remote-tracking branch 'dubbo_remote/master' add cd8b1ec516 Merge remote-tracking branch 'dubbo_remote/master' add 8bd4d05ce7 Merge remote-tracking branch 'dubbo_remote/master' add ded4e0dbc8 Merge remote-tracking branch 'dubbo_remote/master' add b2baa2f36a Merge remote-tracking branch 'dubbo_remote/master' add ba575cb803 Merge remote-tracking branch 'dubbo_remote/master' add ff6e927cd9 Merge remote-tracking branch 'dubbo_remote/master' add 8353c376a9 Merge remote-tracking branch 'dubbo_remote/master' add 83875b0b98 Merge remote-tracking branch 'dubbo_remote/master' add e29abc9124 Merge remote-tracking branch 'dubbo_remote/master' add 1a12dd7c16 Merge remote-tracking branch 'dubbo_remote/master' add 54b32eac4c Merge remote-tracking branch 'dubbo_remote/master' add de80a65da1 Merge remote-tracking branch 'dubbo_remote/master' add be696db047 Merge remote-tracking branch 'dubbo_remote/master' add 2ad6ccfe62 Merge remote-tracking branch 'dubbo_remote/master' add f60d1ac6fe Merge remote-tracking branch 'dubbo_remote/master' add d465534dcf Merge remote-tracking branch 'dubbo_remote/master' add de3a7ff623 Merge remote-tracking branch 'dubbo_remote/master' add e805d4ffd5 Merge remote-tracking branch 'dubbo_remote/master' add 383a3ce4a2 Merge remote-tracking branch 'dubbo_remote/master' add 6737549980 Merge remote-tracking branch 'dubbo_remote/master' add d82764ab85 Merge remote-tracking branch 'dubbo_remote/master' add 8600c53afe Merge remote-tracking branch 'dubbo_remote/master' add 8848769aea Merge remote-tracking branch 'dubbo_remote/master' add c1bb5d32c2 Merge remote-tracking branch 'dubbo_remote/master' add ea323f73af Merge remote-tracking branch 'dubbo_remote/master' add 6906b0d528 Merge remote-tracking branch 'dubbo_remote/master' add f5ebbe29fa Merge remote-tracking branch 'dubbo_remote/master' add 2a7319c618
[dubbo-admin] branch refactor-with-go updated: Cluster overview backend implementation (#1149)
This is an automated email from the ASF dual-hosted git repository. min pushed a commit to branch refactor-with-go in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git The following commit(s) were added to refs/heads/refactor-with-go by this push: new de6f94b1 Cluster overview backend implementation (#1149) de6f94b1 is described below commit de6f94b146372261d453255a71d16606510891a6 Author: Ken Liu AuthorDate: Tue May 30 21:17:04 2023 +0800 Cluster overview backend implementation (#1149) * update link * Cluster overview support * fix ut * fix lint * fix unit tests - Co-authored-by: ken.lj --- pkg/admin/handlers/service.go | 55 +- pkg/admin/model/monitor.go | 22 ++- pkg/admin/router/router.go | 7 +- pkg/admin/services/monitor_service.go | 7 +- pkg/admin/services/prometheus_service_impl.go | 184 + pkg/admin/services/provider_service.go | 11 +- pkg/admin/services/provider_service_impl.go| 170 --- pkg/admin/services/provider_service_impl_test.go | 14 +- pkg/admin/services/route_service_impl.go | 23 +++ pkg/admin/services/traffic/accesslog.go| 2 +- pkg/admin/services/traffic/argument.go | 2 +- .../services/traffic/generic_rule_operation.go | 22 --- pkg/admin/services/traffic/gray.go | 2 +- pkg/admin/services/traffic/mock.go | 2 +- pkg/admin/services/traffic/region.go | 2 +- pkg/admin/services/traffic/retry.go| 2 +- pkg/admin/services/traffic/timeout.go | 2 +- pkg/admin/services/traffic/weight.go | 2 +- 18 files changed, 383 insertions(+), 148 deletions(-) diff --git a/pkg/admin/handlers/service.go b/pkg/admin/handlers/service.go index 47b728c5..e9124a5b 100644 --- a/pkg/admin/handlers/service.go +++ b/pkg/admin/handlers/service.go @@ -41,9 +41,9 @@ import ( ) var ( - providerService services.ProviderService = {} - consumerService services.ConsumerService = {} - prometheusService services.MonitorService = {} + providerService services.ProviderService = {} + consumerService services.ConsumerService = {} + monitorService services.MonitorService = {} ) // AllServices get all services @@ -231,12 +231,46 @@ func ServiceDetail(c *gin.Context) { c.JSON(http.StatusOK, serviceDetail) } +// Version show basic information of the Admin process +// @Summary show basic information of the Admin process +// @Description show basic information of the Admin process +// @Tags metrics +// @Accept json +// @Produce json +// @Success 200 {object} version.Version +// @Router /api/{env}/version [get] func Version(c *gin.Context) { c.JSON(http.StatusOK, version.GetVersion()) } +// FlowMetrics show Prometheus collected metrics +// @Summary show Prometheus collected metrics +// @Description show Prometheus collected metrics +// @Tags metrics +// @Accept json +// @Produce json +// @Success 200 {object} model.FlowMetricsRes +// @Failure 500 {object} model.HTTPError +// @Router /api/{env}/metrics/flow [get] func FlowMetrics(c *gin.Context) { - res, err := prometheusService.FlowMetrics() + res, err := monitorService.FlowMetrics() + if err != nil { + c.JSON(http.StatusInternalServerError, model.HTTPError{Error: err.Error()}) + } + c.JSON(http.StatusOK, res) +} + +// ClusterMetrics show cluster overview +// @Summary show cluster overview +// @Description show cluster overview +// @Tags metrics +// @Accept json +// @Produce json +// @Success 200 {object} model.ClusterMetricsRes +// @Failure 500 {object} model.HTTPError +// @Router /api/{env}/metrics/cluster [get] +func ClusterMetrics(c *gin.Context) { + res, err := monitorService.ClusterMetrics() if err != nil { c.JSON(http.StatusInternalServerError, gin.H{ "error": err.Error(), @@ -245,8 +279,17 @@ func FlowMetrics(c *gin.Context) { c.JSON(http.StatusOK, res) } -func ClusterMetrics(c *gin.Context) { - res, err := prometheusService.ClusterMetrics() +// Metadata show metadata of the cluster, like dubbo versions, protocols, etc. +// @Summary show metadata of the cluster, like dubbo versions, protocols, etc. +// @Description show metadata of the cluster, like dubbo versions, protocols, etc. +// @Tags metrics +// @Accept json +// @Produce json +// @Success 200 {object} model.Metadata +// @Failure 500 {object} model.HTTPError +// @Router /api/{env}/metrics/metadata [get] +func Metadata(c *gin.Context) { + res, err
[dubbo-admin] branch refactor-with-go updated: bump golangci-lint version and fix bugs (#1150)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch refactor-with-go in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git The following commit(s) were added to refs/heads/refactor-with-go by this push: new b9e43855 bump golangci-lint version and fix bugs (#1150) b9e43855 is described below commit b9e4385567bec29bc6b41a11a270cd4b2c9d6b0a Author: Jun <108045855+2456868...@users.noreply.github.com> AuthorDate: Tue May 30 21:08:17 2023 +0800 bump golangci-lint version and fix bugs (#1150) --- Makefile | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f6d64af7..c0f6157d 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ GOFUMPT ?= $(LOCALBIN)/gofumpt KUSTOMIZE_VERSION ?= v3.8.7 CONTROLLER_TOOLS_VERSION ?= v0.10.0 SWAGGER_VERSION ?= v1.16.1 -GOLANG_LINT_VERSION ?= v1.48.0 +GOLANG_LINT_VERSION ?= v1.52.2 GOFUMPT_VERSION ?= latest ## docker buildx support platform PLATFORMS ?= linux/arm64,linux/amd64 @@ -166,6 +166,7 @@ build-dubboctl: ## Build binary with the dubbo dubboctl. build-ui: ## Build the distribution of the admin ui pages. docker build --build-arg LDFLAGS=$(LDFLAGS) --build-arg PKGNAME=dubbo-admin-ui -t ${DUBBO_ADMIN_UI_IMG} ./dubbo-admin-ui -o type=local,dest=./bin/build/dubbo-admin-ui rm -f -R ./cmd/ui/dist/* + rm -f ./bin/build/dubbo-admin-ui/usr/share/nginx/html/50x.html cp -R ./bin/build/dubbo-admin-ui/usr/share/nginx/html/* ./cmd/ui/dist/ rm -f -R ./bin/build/dubbo-admin-ui @@ -260,8 +261,7 @@ endif KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh; .PHONY: kustomize -kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading. -$(KUSTOMIZE): $(LOCALBIN) +kustomize: $(LOCALBIN) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading. @if test -x $(LOCALBIN)/kustomize && ! $(LOCALBIN)/kustomize version | grep -q $(KUSTOMIZE_VERSION); then \ echo "$(LOCALBIN)/kustomize version is not expected $(KUSTOMIZE_VERSION). Removing it before installing."; \ rm -rf $(LOCALBIN)/kustomize; \ @@ -269,28 +269,24 @@ $(KUSTOMIZE): $(LOCALBIN) test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } .PHONY: controller-gen -controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten. -$(CONTROLLER_GEN): $(LOCALBIN) +controller-gen: $(LOCALBIN) ## Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten. test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \ GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) .PHONY: swagger-install -swagger-install: $(SWAGGER) ## Download swagger locally if necessary. -$(SWAGGER): $(LOCALBIN) +swagger-install: $(LOCALBIN) ## Download swagger locally if necessary. test -s $(LOCALBIN)/swag || \ GOBIN=$(LOCALBIN) go install github.com/swaggo/swag/cmd/swag@$(SWAGGER_VERSION) GOLANG_LINT_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh; .PHONY: golangci-lint-install -golangci-lint-install: $(GOLANG_LINT) ## Download golangci lint locally if necessary. -$(GOLANG_LINT): $(LOCALBIN) - test -s $(LOCALBIN)/golangci-lint || \ +golangci-lint-install: $(LOCALBIN) ## Download golangci lint locally if necessary. + test -s $(LOCALBIN)/golangci-lint && $(LOCALBIN)/golangci-lint --version | grep -q $(GOLANG_LINT_VERSION) || \ GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANG_LINT_VERSION) .PHONY: gofumpt-install -gofumpt-install: $(GOFUMPT) ## Download gofumpt locally if necessary. -$(GOFUMPT): $(LOCALBIN) +gofumpt-install: $(LOCALBIN) ## Download gofumpt locally if necessary. test -s $(LOCALBIN)/gofumpt || \ GOBIN=$(LOCALBIN) go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) \ No newline at end of file
[dubbo-go] branch main updated: Enhance logger (#2282)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git The following commit(s) were added to refs/heads/main by this push: new 7ac320fc4 Enhance logger (#2282) 7ac320fc4 is described below commit 7ac320fc46ff7be4d368cfef3d2cb8f23502ab47 Author: zhaoyunxing AuthorDate: Tue May 30 21:06:35 2023 +0800 Enhance logger (#2282) --- common/constant/default.go | 6 + common/constant/key.go | 13 ++ common/extension/logger.go | 43 ++ config/application_config.go| 2 +- config/config_loader.go | 6 + config/logger_config.go | 204 ++-- config/logger_config_test.go| 33 +++-- config/root_config.go | 7 +- config/testdata/config/logger/file_log.yaml | 42 ++ go.mod | 6 +- go.sum | 18 ++- logger/logger.go| 38 ++ logger/logrus/logrus.go | 130 ++ logger/zap/zap.go | 159 ++ protocol/dubbo3/health/serverhealth.go | 2 +- 15 files changed, 547 insertions(+), 162 deletions(-) diff --git a/common/constant/default.go b/common/constant/default.go index 49b764565..8f5ca5584 100644 --- a/common/constant/default.go +++ b/common/constant/default.go @@ -103,3 +103,9 @@ const ( DefaultMaxCallRecvMsgSize = 1024 * 1024 * 4 DefaultMaxCallSendMsgSize = math.MaxInt32 ) + +const ( + LoggerLevel= "info" + LoggerAppender = "console" + LoggerFormat = "text" +) diff --git a/common/constant/key.go b/common/constant/key.go index 51d8753b3..514f81c99 100644 --- a/common/constant/key.go +++ b/common/constant/key.go @@ -391,3 +391,16 @@ const ( HealthCheckServiceTypeName = "DubbogoHealthServer" HealthCheckServiceInterface = "grpc.health.v1.Health" ) + +const ( + LoggerLevelKey = "logger.level" + LoggerDriverKey = "logger.driver" + LoggerFormatKey = "logger.format" + LoggerAppenderKey = "logger.appender" + LoggerFileNameKey = "logger.file.name" + LoggerFileNaxSizeKey= "logger.file.max-size" + LoggerFileMaxBackupsKey = "logger.file.max-backups" + LoggerFileMaxAgeKey = "logger.file.max-age" + LoggerFileLocalTimeKey = "logger.file.local-time" + LoggerFileCompressKey = "logger.file.compress" +) diff --git a/common/extension/logger.go b/common/extension/logger.go new file mode 100644 index 0..2f67190bc --- /dev/null +++ b/common/extension/logger.go @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package extension + +import ( + "github.com/dubbogo/gost/log/logger" + + "github.com/pkg/errors" + + "dubbo.apache.org/dubbo-go/v3/common" +) + +var logs = make(map[string]func(config *common.URL) (logger.Logger, error)) + +func SetLogger(driver string, log func(config *common.URL) (logger.Logger, error)) { + logs[driver] = log +} + +func GetLogger(driver string, config *common.URL) (logger.Logger, error) { + + if logs[driver] != nil { + return logs[driver](config) + } else { + return nil, errors.Errorf("logger for %s does not exist. "+ + "please make sure that you have imported the package "+ + "dubbo.apache.org/dubbo-go/v3/logger/%s", driver, driver) + } +} diff --git a/config/application_config.go b/config/application_config.go index 24e6bc425..60ea32f1f 100644 --- a/config/application_config.go +++ b/config/application_config.go @@ -42,7 +42,7 @@ type ApplicationConfig struct { } // Prefix dubbo.application -func (ApplicationConfig) Prefix() string { +func (ac *ApplicationConfig) Prefix() string { return constant.ApplicationConfigPrefix } diff --git a/config/config_loader.go b/config/config_loader.go index 0b0d919e9..239de5b80 100644 --- a/config/config_loader.go
[dubbo-go] branch main updated: fix: format imports in metrics module (#2323)
This is an automated email from the ASF dual-hosted git repository. alexstocks pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git The following commit(s) were added to refs/heads/main by this push: new 05a7fc070 fix: format imports in metrics module (#2323) 05a7fc070 is described below commit 05a7fc070ff79a0a4e6c064414f0d986d419a1cc Author: Wang Guan AuthorDate: Tue May 30 20:44:33 2023 +0800 fix: format imports in metrics module (#2323) --- metrics/prometheus/after_invocation.go | 5 + metrics/prometheus/api.go | 3 ++- metrics/prometheus/common.go | 7 ++- metrics/prometheus/metric_set.go | 7 ++- metrics/prometheus/reporter.go | 4 metrics/prometheus/reporter_test.go| 5 + metrics/reporter.go| 2 ++ 7 files changed, 30 insertions(+), 3 deletions(-) diff --git a/metrics/prometheus/after_invocation.go b/metrics/prometheus/after_invocation.go index eed549da7..62e05016f 100644 --- a/metrics/prometheus/after_invocation.go +++ b/metrics/prometheus/after_invocation.go @@ -20,10 +20,15 @@ package prometheus import ( "context" "time" +) +import ( "dubbo.apache.org/dubbo-go/v3/common" "dubbo.apache.org/dubbo-go/v3/common/constant" "dubbo.apache.org/dubbo-go/v3/protocol" +) + +import ( "github.com/dubbogo/gost/log/logger" "github.com/prometheus/client_golang/prometheus" ) diff --git a/metrics/prometheus/api.go b/metrics/prometheus/api.go index eba61e17a..5fcdd7b87 100644 --- a/metrics/prometheus/api.go +++ b/metrics/prometheus/api.go @@ -19,7 +19,8 @@ package prometheus import ( "sync" - +) +import ( "github.com/prometheus/client_golang/prometheus" ) diff --git a/metrics/prometheus/common.go b/metrics/prometheus/common.go index 8936e6729..2745b54ed 100644 --- a/metrics/prometheus/common.go +++ b/metrics/prometheus/common.go @@ -21,10 +21,15 @@ import ( "strconv" "strings" "time" +) +import ( + "github.com/prometheus/client_golang/prometheus" +) + +import ( "dubbo.apache.org/dubbo-go/v3/common" "dubbo.apache.org/dubbo-go/v3/common/constant" - "github.com/prometheus/client_golang/prometheus" ) // isProvider shows whether this url represents the application received the request as server diff --git a/metrics/prometheus/metric_set.go b/metrics/prometheus/metric_set.go index 14e16b77d..cf0f1477b 100644 --- a/metrics/prometheus/metric_set.go +++ b/metrics/prometheus/metric_set.go @@ -19,11 +19,16 @@ package prometheus import ( "strings" +) - "dubbo.apache.org/dubbo-go/v3/metrics" +import ( "github.com/prometheus/client_golang/prometheus" ) +import ( + "dubbo.apache.org/dubbo-go/v3/metrics" +) + // metricSet is a set of metrics that are reported to prometheus in dubbo go type metricSet struct { // report the consumer-side's rt gauge data diff --git a/metrics/prometheus/reporter.go b/metrics/prometheus/reporter.go index dc55ac1ff..96b799640 100644 --- a/metrics/prometheus/reporter.go +++ b/metrics/prometheus/reporter.go @@ -21,11 +21,15 @@ import ( "context" "net/http" "sync" +) +import ( ocprom "contrib.go.opencensus.io/exporter/prometheus" "github.com/dubbogo/gost/log/logger" "github.com/prometheus/client_golang/prometheus" +) +import ( "dubbo.apache.org/dubbo-go/v3/common/extension" "dubbo.apache.org/dubbo-go/v3/metrics" ) diff --git a/metrics/prometheus/reporter_test.go b/metrics/prometheus/reporter_test.go index d48d92f13..af3def402 100644 --- a/metrics/prometheus/reporter_test.go +++ b/metrics/prometheus/reporter_test.go @@ -21,12 +21,17 @@ import ( "context" "testing" "time" +) +import ( "dubbo.apache.org/dubbo-go/v3/common" "dubbo.apache.org/dubbo-go/v3/common/extension" "dubbo.apache.org/dubbo-go/v3/metrics" "dubbo.apache.org/dubbo-go/v3/protocol" "dubbo.apache.org/dubbo-go/v3/protocol/invocation" +) + +import ( "github.com/stretchr/testify/assert" ) diff --git a/metrics/reporter.go b/metrics/reporter.go index 4a016e39c..9439f02c2 100644 --- a/metrics/reporter.go +++ b/metrics/reporter.go @@ -20,7 +20,9 @@ package metrics import ( "context" "time" +) +import ( "dubbo.apache.org/dubbo-go/v3/protocol" )
[dubbo-go] branch main updated: add: implement dynamic routing (#2303)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git The following commit(s) were added to refs/heads/main by this push: new b16c55794 add: implement dynamic routing (#2303) b16c55794 is described below commit b16c5579403722e46bd810a31c0e213ef44e0bf7 Author: finalt AuthorDate: Tue May 30 20:33:01 2023 +0800 add: implement dynamic routing (#2303) --- cluster/router/condition/dynamic_router.go | 205 cluster/router/condition/factory.go| 56 cluster/router/condition/matcher/attachment.go | 70 + cluster/router/condition/matcher/base.go | 4 +- cluster/router/condition/matcher/factory.go| 27 +- .../condition/matcher/pattern_value/scope.go | 126 .../condition/matcher/pattern_value/wildcard.go| 5 +- cluster/router/condition/route.go | 32 +- cluster/router/condition/router_test.go| 348 - common/constant/key.go | 3 + common/extension/router_condition_matcher.go | 37 +++ common/extension/router_condition_pattern_value.go | 37 +++ imports/imports.go | 1 + 13 files changed, 919 insertions(+), 32 deletions(-) diff --git a/cluster/router/condition/dynamic_router.go b/cluster/router/condition/dynamic_router.go new file mode 100644 index 0..9d613dfe4 --- /dev/null +++ b/cluster/router/condition/dynamic_router.go @@ -0,0 +1,205 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package condition + +import ( + "strconv" + "strings" + "sync" +) + +import ( + "github.com/dubbogo/gost/log/logger" +) + +import ( + "dubbo.apache.org/dubbo-go/v3/common" + conf "dubbo.apache.org/dubbo-go/v3/common/config" + "dubbo.apache.org/dubbo-go/v3/common/constant" + "dubbo.apache.org/dubbo-go/v3/config" + "dubbo.apache.org/dubbo-go/v3/config_center" + "dubbo.apache.org/dubbo-go/v3/protocol" + "dubbo.apache.org/dubbo-go/v3/remoting" +) + +type DynamicRouter struct { + conditionRouters []*StateRouter + routerConfig *config.RouterConfig +} + +func (d *DynamicRouter) Route(invokers []protocol.Invoker, url *common.URL, invocation protocol.Invocation) []protocol.Invoker { + if len(invokers) == 0 || len(d.conditionRouters) == 0 { + return invokers + } + + for _, router := range d.conditionRouters { + invokers = router.Route(invokers, url, invocation) + } + return invokers +} + +func (d *DynamicRouter) URL() *common.URL { + return nil +} + +func (d *DynamicRouter) Process(event *config_center.ConfigChangeEvent) { + if event.ConfigType == remoting.EventTypeDel { + d.routerConfig = nil + d.conditionRouters = make([]*StateRouter, 0) + } else { + routerConfig, err := parseRoute(event.Value.(string)) + if err != nil { + logger.Warnf("[condition router]Build a new condition route config error, %+v and we will use the original condition rule configuration.", err) + return + } + d.routerConfig = routerConfig + conditions, err := generateConditions(d.routerConfig) + if err != nil { + logger.Warnf("[condition router]Build a new condition route config error, %+v and we will use the original condition rule configuration.", err) + return + } + d.conditionRouters = conditions + } +} + +func generateConditions(routerConfig *config.RouterConfig) ([]*StateRouter, error) { + if routerConfig == nil { + return make([]*StateRouter, 0), nil + } + conditionRouters := make([]*StateRouter, 0, len(routerConfig.Conditions)) + for _, conditionRule := range routerConfig.Conditions { + url, err := common.NewURL("condition://") + if err != nil { + return nil, err + } +
[dubbo-go] branch main updated: add: tag route static config (#2304)
This is an automated email from the ASF dual-hosted git repository. alexstocks pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git The following commit(s) were added to refs/heads/main by this push: new afb8a615e add: tag route static config (#2304) afb8a615e is described below commit afb8a615e06c5f48ada746f941c9611f02346440 Author: wudong5 <63356845+wudo...@users.noreply.github.com> AuthorDate: Tue May 30 20:24:43 2023 +0800 add: tag route static config (#2304) * add subscribe any value * fix nill error bug * fix bug that commentted by niu Signed-off-by: wudong * add static * use strings.Join * fix test error - Signed-off-by: wudong Co-authored-by: Ken Liu --- cluster/router/tag/router.go | 11 --- cluster/router/tag/router_test.go | 38 -- config/application_config.go | 1 + config/config_loader.go| 1 + config_center/zookeeper/impl.go| 1 + imports/imports.go | 1 + registry/service_instance.go | 16 +++-- registry/zookeeper/service_discovery.go| 2 ++ .../curator_discovery/service_instance.go | 1 + 9 files changed, 47 insertions(+), 25 deletions(-) diff --git a/cluster/router/tag/router.go b/cluster/router/tag/router.go index d642a792a..7561cf1e0 100644 --- a/cluster/router/tag/router.go +++ b/cluster/router/tag/router.go @@ -52,7 +52,8 @@ func (p *PriorityRouter) Route(invokers []protocol.Invoker, url *common.URL, inv logger.Warnf("[tag router] invokers from previous router is empty") return invokers } - key := url.Service() + constant.TagRouterRuleSuffix + // tag is valid in application + key := strings.Join([]string{url.GetParam(constant.ApplicationKey, ""), constant.TagRouterRuleSuffix}, "") value, ok := p.routerConfigs.Load(key) if !ok { return staticTag(invokers, url, invocation) @@ -76,9 +77,9 @@ func (p *PriorityRouter) Notify(invokers []protocol.Invoker) { if len(invokers) == 0 { return } - service := invokers[0].GetURL().Service() - if service == "" { - logger.Error("url service is empty") + application := invokers[0].GetURL().GetParam(constant.ApplicationKey, "") + if application == "" { + logger.Error("url application is empty") return } dynamicConfiguration := conf.GetEnvInstance().GetDynamicConfiguration() @@ -86,7 +87,7 @@ func (p *PriorityRouter) Notify(invokers []protocol.Invoker) { logger.Warnf("config center does not start, please check if the configuration center has been properly configured in dubbogo.yml") return } - key := service + constant.TagRouterRuleSuffix + key := strings.Join([]string{application, constant.TagRouterRuleSuffix}, "") dynamicConfiguration.AddListener(key, p) value, err := dynamicConfiguration.GetRule(key) if err != nil { diff --git a/cluster/router/tag/router_test.go b/cluster/router/tag/router_test.go index 22ddba793..8a29503ac 100644 --- a/cluster/router/tag/router_test.go +++ b/cluster/router/tag/router_test.go @@ -129,8 +129,8 @@ func TestRouter(t *testing.T) { t.Run("dynamicEmptyTag_requestEmptyTag", func(t *testing.T) { p, err := NewTagPriorityRouter() assert.Nil(t, err) - p.routerConfigs.Store(consumerUrl.Service()+constant.TagRouterRuleSuffix, config.RouterConfig{ - Key: consumerUrl.Service() + constant.TagRouterRuleSuffix, + p.routerConfigs.Store(consumerUrl.GetParam(constant.ApplicationKey, "")+constant.TagRouterRuleSuffix, config.RouterConfig{ + Key: consumerUrl.GetParam(constant.ApplicationKey, "") + constant.TagRouterRuleSuffix, Force: false, Enabled: true, Valid: true, @@ -149,8 +149,8 @@ func TestRouter(t *testing.T) { t.Run("dynamicEmptyTag_requestHasTag", func(t *testing.T) { p, err := NewTagPriorityRouter() assert.Nil(t, err) - p.routerConfigs.Store(consumerUrl.Service()+constant.TagRouterRuleSuffix, config.RouterConfig{ - Key: consumerUrl.Service() + constant.TagRouterRuleSuffix, + p.routerConfigs.Store(consumerUrl.GetParam(constant.ApplicationKey, "")+constant.TagRouterRuleSuffix, config.RouterConfig{ + Key: consumerUrl.GetParam(constant.ApplicationKey, "") + constant.TagRouterRuleSuffix, Force: false, Enabled: true,
[dubbo-go] branch main updated: refactor: split metrics module into multiple files (#2310)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git The following commit(s) were added to refs/heads/main by this push: new 66a152c3d refactor: split metrics module into multiple files (#2310) 66a152c3d is described below commit 66a152c3d8f8820806872ef4d9bb037df9d7d367 Author: Wang Guan AuthorDate: Tue May 30 17:04:44 2023 +0800 refactor: split metrics module into multiple files (#2310) --- common/constant/key.go | 3 + common/extension/metrics_test.go | 11 +- config/metric_config.go| 9 +- filter/metrics/filter.go | 4 +- filter/metrics/filter_test.go | 12 +- metrics/prometheus/after_invocation.go | 78 + metrics/prometheus/api.go | 199 .../prometheus/before_invocation.go| 33 +- metrics/prometheus/common.go | 111 +++ .../prometheus/constant.go | 52 ++-- metrics/prometheus/metric_set.go | 63 metrics/prometheus/reporter.go | 346 + metrics/prometheus/reporter_test.go| 13 +- metrics/reporter.go| 4 +- 14 files changed, 504 insertions(+), 434 deletions(-) diff --git a/common/constant/key.go b/common/constant/key.go index 131b200ae..16933a408 100644 --- a/common/constant/key.go +++ b/common/constant/key.go @@ -176,6 +176,9 @@ const ( const ( ApplicationKey = "application" + ApplicationNameKey = "application_name" + HostnameKey= "hostname" + IpKey = "ip" OrganizationKey= "organization" NameKey= "name" ModuleKey = "module" diff --git a/common/extension/metrics_test.go b/common/extension/metrics_test.go index c4cdc41a5..47395161d 100644 --- a/common/extension/metrics_test.go +++ b/common/extension/metrics_test.go @@ -21,15 +21,10 @@ import ( "context" "testing" "time" -) -import ( - "github.com/stretchr/testify/assert" -) - -import ( "dubbo.apache.org/dubbo-go/v3/metrics" "dubbo.apache.org/dubbo-go/v3/protocol" + "github.com/stretchr/testify/assert" ) func TestGetMetricReporter(t *testing.T) { @@ -44,6 +39,6 @@ func TestGetMetricReporter(t *testing.T) { type mockReporter struct{} -// Report method for feature expansion -func (m mockReporter) Report(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation, cost time.Duration, res protocol.Result) { +// implement the interface of Reporter +func (m mockReporter) ReportAfterInvocation(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation, cost time.Duration, res protocol.Result) { } diff --git a/config/metric_config.go b/config/metric_config.go index 14d7b7271..b47d48a56 100644 --- a/config/metric_config.go +++ b/config/metric_config.go @@ -22,19 +22,16 @@ import ( "github.com/dubbogo/gost/log/logger" - "github.com/pkg/errors" -) - -import ( "dubbo.apache.org/dubbo-go/v3/common/extension" "dubbo.apache.org/dubbo-go/v3/metrics" + "github.com/pkg/errors" ) // MetricConfig This is the config struct for all metrics implementation type MetricConfig struct { Mode string `default:"pull" yaml:"mode" json:"mode,omitempty" property:"mode"` // push or pull, Namespace string `default:"dubbo" yaml:"namespace" json:"namespace,omitempty" property:"namespace"` - Enable bool `default:"true" yaml:"enable" json:"enable,omitempty" property:"enable"` + Enable *bool `default:"true" yaml:"enable" json:"enable,omitempty" property:"enable"` Port string `default:"9090" yaml:"port" json:"port,omitempty" property:"port"` Path string `default:"/metrics" yaml:"path" json:"path,omitempty" property:"path"` PushGatewayAddress string `default:"" yaml:"push-gateway-address" json:"push-gateway-address,omitempty" property:"push-gateway-address"` @@ -50,7 +47,7 @@ func (mc *MetricConfig) ToReporterConfig() *metrics.ReporterConfig { defaultMetricsReportConfig.Namespace = mc.Namespace } - defaultMetricsReportConfig.Enable = mc.Enable + defaultMetricsReportConfig.Enable = *mc.Enable defaultMetricsReportConfig.Port = mc.Port defaultMetricsReportConfig.Path = mc.Path defaultMetricsReportConfig.PushGatewayAddress = mc.PushGatewayAddress diff --git a/filter/metrics/filter.go b/filter/metrics/filter.go index ba33cc67a..9782c0d4e 100644 --- a/filter/metrics/filter.go +++ b/filter/metrics/filter.go @@ -21,9 +21,7 @@ package metrics