Commit Graph

187 Commits

Author SHA1 Message Date
jean pierre Lerbscher 00812ce41c
Fix Sonar issue s2293 The diamond operator ('<>') should be used (#14005) 2024-03-29 11:40:06 +08:00
namelessssssssssss 860ad02e1e
Fix URL issue (#13807) 2024-03-01 14:20:07 +08:00
TomlongTK 617dbd3fdd
Make config builder more comprehensive (#13556)
* Make config builder more comprehensive

* Format
2023-12-25 19:17:48 +08:00
huazhongming f7a32be429
Remove unused dependency (#13554)
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2023-12-22 10:25:53 +08:00
TestBoost 570cd47d9a
only call DubboBootstrap.reset(); once to make the test org.apache.dubbo.generic.GenericServiceTest faster (#13466) 2023-12-14 19:12:27 +08:00
huazhongming 730695a7a2
[3.2]Use spotless to format the code (#13320)
* Use spotless to format the code

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* Support develop with JDK 21

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

---------

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2023-11-07 15:40:13 +08:00
Linchen Xu b41fe3ca35
Optimize MethodConfigTest (#13234) 2023-10-20 15:41:31 +08:00
Albumen Kevin 0d91d419a8
Remove direct dependency of alibaba dubbo (#13218)
* Remove direct dependency of alibaba dubbo

* disable in ExtensionLoader

* Fix license

* Fix test

* Fix case

* Fix test
2023-10-19 15:25:40 +08:00
Albumen Kevin 27d9ce3836
Support get alibaba GenericService from spring context (#12585) 2023-06-22 19:31:31 +08:00
Albumen Kevin f28c2fec72
Fix alibaba Rpc compact (#12581)
* Fix alibaba Rpc compact

* Fix alibaba Rpc compact

* Fix alibaba Rpc compact

* Fix alibaba Rpc compact
2023-06-22 08:49:23 +08:00
Albumen Kevin 8ad792c287
Add transient to some overrided field (#12570) 2023-06-19 21:29:24 +08:00
Albumen Kevin e07e5e294b
Fix get method name from invocation (#12519)
* Fix get method name from invocation

* fix compile
2023-06-13 20:25:25 +08:00
Xiang Wei Zhang 40b805ee88
Fix hashCode change in 2.6 DIY ConsistentHashLoadBalance (#12468)
* Fix hashCode change in 2.6 DIY ConsistentHashLoadBalance

When using 2.6.x DIY ConsistentHashLoadBalance, Invoker will wrap to CompatibleInvoker. Then invokers.hashCode() will return different hashCode event original Invokers not change. This will cause many duplicate Object like ConsistentHashSelector in jvm Eden space, and young gc will be very frequently.

* add override equals

* Add object and class check equals
2023-06-09 15:21:58 +08:00
wangda 24935b1bb0
Correcting spelling mistakes (#12480)
Signed-off-by: zhangwd3 <zhangwd3@asiainfo.com>
2023-06-09 10:29:27 +08:00
Albumen Kevin ba308219c6
Register services after module started (#12450) 2023-06-07 13:49:49 +08:00
Albumen Kevin c8ef10e8a5
Check if return AsyncRpcResult in Filter (#12467)
* Check if return AsyncRpcResult in Filter

* Fix compatible
2023-06-06 19:39:50 +08:00
Albumen Kevin d6661cf501
Introduce DelegateURL to proxy apache URL to alibaba URL (#12449)
* Introduce DelegateURL to proxy apache URL to alibaba URL

* Fix license
2023-06-05 10:09:30 +08:00
Albumen Kevin 057dcb4512
Fix alibaba Filter / Result Compact (#12440) 2023-06-01 15:43:07 +08:00
Albumen Kevin 581defa2b4
Add alibaba RpcContext getInvocation compact (#12416) 2023-05-29 15:31:16 +08:00
Albumen Kevin 2ffda4b239
Fix alibaba AbstractLoadBalance compact (#12396) 2023-05-25 09:24:19 +08:00
Albumen Kevin da70e9097f
Fix alibaba AbstractLoadBalance compact (#12394) 2023-05-24 20:19:25 +08:00
Xiang Wei Zhang 35a6365d3f
Fix ClassCastException caused by 2.x's filter in some condition (#12286)
* fix ClassCastException caused by 2.x's filter in some condition

* compatible of RpcResult in dubbo version 2.x

* extends AppResponse to make code better

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>

* Add whenCompleteWithContext empty implement to compatible of FilterChainBuilder's invoke

* Add license

* Update compact

* Fix 2.6's Filter return RpcResult handle as AsyncRpcResult

When DubboProtocol.CompletableFuture running result.thenApply and  FilterChainBuilder.CallbackRegistrationInvoker running asyncResult.whenCompleteWithContext. All Result handle as AsyncRpcResult, so RpcResult add some methods implements seems like AsyncRpcResult does.

* revert last commit

---------

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
2023-05-17 14:25:09 +08:00
Albumen Kevin bdc0695d78
Fix compatible signature mismatch (#12220)
* Fix compatible signature mismatch

* Fix license
2023-05-03 10:42:00 +08:00
Albumen Kevin 3552347d44
Support Shutdown Gracefully (#12118) 2023-04-28 14:21:47 +08:00
KamTo Hung f05662a66d
optimize JsonUtils (#12057) 2023-04-11 11:24:55 +08:00
wxbty 06605365c5
splits qos-api pkg (#11853)
* init

* add licence

* fix path name

* add api for depall

* add bom pom

---------

Co-authored-by: x-shadow-man <1494445739@qq.com>
2023-03-17 13:33:49 +08:00
Albumen Kevin f742e25ba2 Merge branch 'apache-3.1' into apache-3.2
# Conflicts:
#	dubbo-dependencies-bom/pom.xml
#	dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml
#	dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml
#	dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
#	pom.xml
2023-03-17 10:07:46 +08:00
Xiang Wei Zhang a6ef8910ca
Fix 2.6.x LoadBalance SPI not work (#11730) 2023-03-13 20:15:54 +08:00
尔等同学 7e51047cb0
delete never thrown exception (#11674) 2023-02-27 20:09:15 +08:00
aamingaa a70cc27700
feat: optimize code (#11671) 2023-02-27 13:09:10 +08:00
Albumen Kevin cbcbac9ce6
Introduce Invocation#getInvokedInvokers to get invokers for ClusterFilter (#11359) 2023-01-20 14:01:14 +08:00
Albumen Kevin 9f9b3d7cb7 Merge branch 'apache-3.1' into apache-3.2
# Conflicts:
#	dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java
2022-11-22 16:05:58 +08:00
Albumen Kevin 237042cbb5
Remove public modifier in dubbo-compatiable (#10983) 2022-11-22 14:04:08 +08:00
aamingaa ee9d01a6e0
feat: split rpcContext (#10798) 2022-11-10 20:56:26 +08:00
Albumen Kevin f1af604e7e
Fastjson2 Support (#10166) 2022-07-15 10:18:41 +08:00
cheese8 4be39e4744
refactor ExtensionInjector and related (#10301)
* refactor SpiExtensionInjector and related

* refactor the code style
2022-07-12 11:16:48 +08:00
Albumen Kevin 675cd4bb13
[3.0] Exact json utils (#10156) 2022-06-16 14:54:31 +08:00
Albumen Kevin 89863e048d
[3.0] Add safe foreach in RpcInvocation & Revert synchronizedMap in RpcInvocation (#10160)
* revert

* [3.0] Add safe foreach in RpcInvocation & Revert synchronizedMap in RpcInvocation

* fix ut
2022-06-15 17:40:20 +08:00
ken.lj 5880b02095
[3.0] 'com.alibaba.dubbo' package compatibility (#9993)
fixes #9977
2022-05-07 17:46:35 +08:00
ken.lj 8826443eac
revert invocation changes in #9659 for compatibility purpose. (#9689) 2022-02-16 15:32:43 +08:00
Albumen Kevin 0d3b572e2a
[3.0] ServiceDefinition usage refactor & distinguish serviceName and interfaceName (#9659) 2022-02-11 14:11:37 +08:00
ken.lj 1700df36d2
fix curator5 and metadata (#9535) 2022-01-06 17:24:44 +08:00
ken.lj b2a4f612ec
3.0 service discovery metadata refactor (#9506) 2021-12-29 10:56:05 +08:00
huazhongming fa245c7a1a
According to rfc3986, revise the logic of changing the authority in the URL (#9170) 2021-11-03 10:59:39 +08:00
Gong Dewei 1bdf359b1a
[3.0] Manage global resources and executor services, fix zk client connections (#9033)
* shutdown scheduledExecutors and executorServiceRing

* fix NPE of configuration

* Fix notify loop after executor service is shutdown

* improve registry center in tests

* polish unregister shutdown hook log

* Fix systemConfiguration NPE

* enable surefire reuseForks for fast testing

* Fix checking DubboShutdownHook is alive

* fix SPI/Bean instantiation constructor matching

* shutdown share executor

* release zk client

* Improve application destroy processing

* Add GlobalResourcesRepository to manager static resources, including ExecutorService and HashedWheelTimer

* revert zk client address mapping

* Fix zk client early close problem

* improve executor service

* improve both start by module and by application

* release sharedScheduledExecutor and fix AccessLogFilter

* Fix tests

* checking zk registry if destroyed

* fix testSystemPropertyOverrideReferenceConfig config error

* improve KeepRunningOnSpringClosedTest

* SPI extension/scope bean prefers parameterized constructor instead of default constructor

* Support compatible usage of ZookeeperRegistryFactory

* Improve the application/module destroy process, the deployer destruction is divided into pre-destroy and post-destroy

* Destroy NacosDynamicConfiguration

* Destroy MetadataReportFactory

* Recreate adaptive classes

* Destroy global resources on dubbo shutdown

* Fix zk thread leaks when create client failed

* Improve protocol destroying

* Improve thread name of protocol port

* Manage global EventLoopGroup, HashedWheelTimer, etc.

* Protected metadata info in memory

* Support checking unclosed threads when finish test class

* Improve application check started

* add test log4j.properties

* add pom.xml of dubbo-test-check

* fix CodecSupport.checkSerialization error

* Fix ReferenceCountExchangeClientTest log msg checking

* Fix ServiceInstanceMetadataUtilsTest and MigrationInvokerTest

* Fix protocol destroy problem

* rename test check jvm args

* cancel asyncMetadataFuture and unregisterServiceInstance in pre-destroy application

* Ignore refresh metadata if application is stopping

* Remove unused destroyDynamicConfigurations method

* Change ZookeeperTransporter to application scope

* Add testMultiProviderApplicationsStopOneByOne

* Destroy ZookeeperTransporter in RemotingScopeModelInitializer

* support specify test check report file
2021-10-19 10:11:53 +08:00
Albumen Kevin 31c5ee4086
Refactor Injvm invoke (#8926)
* Refactor Injvm invoke

* Add ut

* Fix import

* Remove deprecated method & fix ut

* Fix Cluster join
2021-09-28 10:58:51 +08:00
Gong Dewei eba466e0c8
[3.0] improve unit test efficiency (#8877)
* speed up maven building, disable update snapshot, remove unnecessary repositories

* reduce shutdown wait time

* update maven version to fix build error such as "java.lang.IllegalStateException: Entry [id:..][route:{s}->...][state:null] has not been leased from this pool", see
 https://issues.apache.org/jira/browse/HTTPCORE-634 (httpcore 4.4.14)

* add shutdown timeout for netty4

* fix scope model

* read server shutdown wait time before destroy

* Add shutdown timeout for triple protocol

* Improve register center of tests

* set shutdown wait time as attribute of ProtocolServer

* Fix reconnect and close

* fix closePromise
2021-09-23 17:38:19 +08:00
Albumen Kevin 754404a15d
Fix #8843, recover Servlet Page API (#8884) 2021-09-23 16:33:23 +08:00
吴治国 baec4b3425
[3.0] Fix appendAttribute key (#8847)
Fix attribute name of config metadata
2021-09-18 17:56:03 +08:00
Gong Dewei ea151d0f51
[3.0] New service repository support for multi instance (#8669)
* Add ExtensionDirector and Models

* Fix access static getter method of ApplicationModel

* Replace ExtensionFactory with ExtensionInjector

* specify scope of some SPIs

* Support scoped injection for extension

* improve create extension loader logic

* Add ScopeModel and ScopeBeanFactory, fix extension initialization of XxxConfig

* polish doc of scope model

* Extract FrameworkStatusReportService from FrameworkStatusReporter

* Fix application model of default bootstrap instance

* Pass scope model through URL

* Fix scope model of registry, metadata, cluster and so on

* exact ServiceModel from ProviderModel and ConsumerModel

* Add ASF license header for ScopeBeanFactoryInitializer

* Remove unused import

* Remove unused import

* Fix ut in ConfigManagerTest

* Change default Scope Behave

* Resolve recursive creation of Scope Model

* Fix inject default model when scope is parent

* Fix inject default model when scope is parent

* Compact with url without ScopeModel

* Change HttpBinder Scope

* Change some SPIs' scope

* Fix setApplicationModel override issue of MetadataServiceNameMapping

* Default inject ScopeModel in ConfigManager

* Add default Scope for AbstractConfig when init

* Fix field override & Fix ut env

* Fix zk not startup in DubboBootstrapMultiInstanceTest

* Fix ExtensionAccessor not inject in UT of MetricsFilterTest

* Compact old style getName

* Fix UT in DNSServiceDiscoveryTest

* Compact old style ApplicationModel

* Fix UT in DNSServiceDiscoveryTest

* Fix repository changed after ApplicationModel destroyed

* Fix SpringExtensionInjector pollution in UT

* Pass ApplicationModel in ServiceInstance

* reintroduce metadata delay key

* Add Transient on ApplicationModel getter of DefaultServiceInstance

* Fix Configurator Listener in Singleton mode override issue

* Fix Configurator Listener in Singleton mode override issue

* Compact old style getApplication

* Invocation pass ServiceModel

* Compact old style registerConsumer

* Fix NPE in RpcInvocation

* Add ServiceModel pass when init

* Fix ServiceModel cast error

* Add ServiceModel pass when invoke

* Fix NPE when simplify registry url

* Revert "Resolve recursive creation of Scope Model"

This reverts commit 37a99957

* Improve scope model aware

* polish scope model

* Cleanup ApplicationModel.defaultModel usage

* Fix ut

* Compatible with 2.6 Registry

* Fix ut

* Add Callback Service build ProviderModel

* improve scope model of config bean

* Fix scope model of reference/service model

* Revert CallbackServiceCodec for dev

* Fix scope model NPE

* Fix consumer url NPE

* Add Callback Service build ProviderModel

* Fix NPE when destroy

* Fix ut

* pick from Add Callback Service build ProviderModel (b47b2777f9)

* add failback logic for ut

* Fix ut

* Add Scope Model check

* Fix adaptive spi extension loading

* update adaptive classes

* Split ServiceRepository

* Fix apache license

* Fix UT

* Fix uts

* Fix DubboCodec

* Fix ut in DubboBootstrapTest

* Fix ut in DubboBootstrapTest

* Suspend register duplicate providers error

* Improve get unwrapped extension

* Fix GenericServiceTest

* Destroy all protocols in DubboBootstrap.reset()

* Add --no-snapshot-updates and -fae for test fail safe

* Fix uts

* Reset ApplicationModel Before Test

* Improve scope model initialization

* Support instantiating spi/bean constructor with scope model parameters

* change to fail never mode (-fn)

* get unwrapped instance of DubboProtocol

* Change referenced config's scope model after scope model changed

* Change referenced config's scope model after scope model changed

* Fix NPE of setScopeMode

* change to fail-at-end (-fae) mode

* Fix change scope model error

* Avoid duplicate destroy model

* Fix LocalCallMultipleReferenceAnnotationsTest

* Avoid injection bean type of java.lang.Object

* change to fail fast mode

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
2021-09-03 21:00:47 +08:00