Commit Graph

1266 Commits

Author SHA1 Message Date
shalk(xiao kun)
de10c07146
clean code remove unused dependency javatuple (#11976) 2024-04-24 15:51:58 +08:00
cx
720519b1dc
[ISSUE #11994]修复HttpRequestInstanceBuilderTest出现的空指针问题,优化SnowFlakeInstanceIdGenerator初始化流程 (#11995)
* [ISSUE #11994] fix: Initialize EnvUtil's variable environment in HttpRequestInstanceBuilderTest

* refactor: Optimize the initialization process of SnowFlakeInstanceIdGenerator

* refactor: optimize the initialization process of SnowFlakeInstanceIdGenerator.
2024-04-23 09:31:11 +08:00
Happy-26
2005ca6f90
[ISSUE #11951] Fix the problem that the servicename and groupname are not resolved correctly when deleting an empty service instance (#11955)
* Fixed an issue where the maximum number of anti-fragile plug-ins implemented by default in Nacos is one more than the actual number of connections.

* bug fix : 修改删除空服务实例时,服务名和分组名没有正确解析的问题
2024-04-15 15:20:02 +08:00
blake.qiu
c09ee2da04
fix(#11895): grpc 服务注册失败时返回了成功 (#11909) 2024-04-02 14:13:46 +08:00
publicize-y
2df335d57e
Response wrong status code for some situation for openAPI (#11864)
* fix:Response wrong status code for some situation for openAPI

* fix:Response wrong status code for some situation for openAPI for PrometheusApiExceptionHandler

* fix:PrometheusApiExceptionHandler status modify

* fix:add unit test

* fix:modify the unit test description

* fix:the code style modify

* fix:the UT modify
2024-04-01 14:11:16 +08:00
徐晓伟
08edb4fbd6
⬆️ upgrade mysql-connector-java from 8.0.28 to 8.0.33 (#11875)
https://github.com/alibaba/nacos/issues/11874
2024-03-26 16:22:06 +08:00
chenyiqin
a7d9ef2fe8
Fix get batch service instances error (#11845)
* fix get batch service instances error

* fix checkstyle

* fix get wrong res when batch instance

* add the clientId to return data
2024-03-25 18:03:48 +08:00
JianweiWang
b79d585f97
fix #11835 (#11838) 2024-03-18 09:36:31 +08:00
zhanghong
8f1cb59370
[ISSUE #11782] Optimized the use of map (#11783)
* Optimized the use of map

* Optimized the use of map
2024-03-01 10:05:33 +08:00
chenyiqin
0ee724ee7f
Fix class cast error when distro sync batch service data (#11702)
* fix class cast error when distro sync batch service data

* check for logic

* simplify logic

* add ut for distro data process

* rm redundant mock
2024-02-20 10:51:51 +08:00
杨翊 SionYang
139f4f2377
Add client module ut. (#11739)
* Add client module ut.

* Fix naming ut possible failed.
2024-02-06 16:11:25 +08:00
peachisai
1b9a22c1a8
Fix when push fail the totalPush variable count cannot increase (#11704) 2024-01-31 10:27:01 +08:00
CZJCC
c98b8c4111
修复client register事件跟clientManager addClient异步并行问题 (#11634) 2024-01-10 19:06:37 +08:00
hth
ea94095f74
[ISSUES #9001]spi instanceIdGenerator and snowFlakeInstanceIdGenerator (#11561)
* spi instanceIdGenerator and snowFlakeInstanceIdGenerator

* Test fix

* fix InstanceId set

* Copyright fix
2024-01-05 17:53:56 +08:00
blake.qiu
93cc842c90
feat(#11393): support register or deregister persistent instance by grpc in 2.3.0 server and client. (#11430) 2023-11-27 19:47:20 +08:00
杨翊 SionYang
7ce177486f
Develop fill ut common (#11419)
* UT for common module http package.

* Add Unit test for common module http root package.

* Add Unit test for common module http param package.

* Add Unit test for common module http client package.

* For checkstyle.
2023-11-23 14:56:54 +08:00
杨翊 SionYang
03987330a4
Upgrade dependency to reduce conflicts and add leak UT coverage files. (#11396)
* Remove custom jackson version and jackson-core-asl.

* Upgrade protobuf relative version to reduce conflict with grpc.

* 补充提交遗漏单测覆盖率的模块。
2023-11-17 17:56:50 +08:00
zhanghong
a935fa1092
[ISSUE #11343] Simplified validation logic (#11345)
* 优化节点显示,添加mode

* Simplified validation logic

* add license

* fix unit test

* add config,console,naming unit test and rename annotation

* add config,console,naming unit test and rename annotation

* fix EnvUtils test

* fix EnvUtils test

* fix ParamExtractorFilterTest

* fix ParamExtractorFilterTest

* fix ParamExtractorFilterTest

* fix ParamExtractorFilterTest

* fix ParamExtractorFilterTest
2023-11-15 15:25:00 +08:00
杨翊 SionYang
e77a0bbe0d
Develop refactor topn (#11352)
* Move topn to core module.

* StringTopNCounter replace TopnCounterMetricsContainer.java

* Use ServiceTopNCounter replace StringTopNCounterTest for naming.

* Use FixedSizePriorityQueue replace PriorityQueue to save memory.

* For PMD.
2023-11-09 17:19:27 +08:00
阿魁
086be0386b
[ISSUE #11253]To fix the triggering of the listener upon failover con… (#11254)
* [ISSUE #11253]To fix the triggering of the listener upon failover content changes.

* [ISSUE #11255]Update style.

* [ISSUE #11255]Fix UdpConnectorTest#testContainAck.
2023-10-23 13:48:54 +08:00
E1se2t
5d8973cad5
[ISSUE#11192] batchRegisterInstance add recalculateRevision (#11232)
* [ISSUE#11192] batchRegisterInstance add recalculateRevision

* fix: update unit test

* fix: code check style

* fix:update unit test

* Update EphemeralClientOperationServiceImplTest.java
2023-10-11 17:20:00 +08:00
杨翊 SionYang
51b6a443d3
Refactor control plugin (#11174)
* Refactor control plugin and add default implementation.

* Move auth default plugin into other modules.

* Fix control plugin config not effect problem.

* Fix UT error.
2023-09-22 16:59:25 +08:00
杨翊 SionYang
0c44dce0cc
Refactor control plugin (#11169)
* Refactor control plugin.

* For checkstyle.
2023-09-21 13:47:28 +08:00
阿魁
02fcbb0915
[ISSUE #11057]Add update instance and update service trace event for naming. (#11069)
* [ISSUE #11057]Add update instance and update service trace event for naming.

* [ISSUE #11057]Add license.

* [ISSUE #11057]Remove unused imports.

* [ISSUE #11057]Improve the logic.

* [ISSUE #11057]Fix checkStyle.

* [ISSUE #11057]Perfect unit test.

* [ISSUE #11057]Improve the logic.

* [ISSUE #11057]Improve the logic.

* [ISSUE #11057]UpdateInstanceTraceEvent add metadata.

* [ISSUE #11057]UpdateServiceTraceEvent.java add metadata.
2023-09-06 17:01:16 +08:00
Sunrisea
828acd3b2b
For #10734,补全参数检验日志记录,将返回的状态码修改为400 (#11073) 2023-09-01 11:41:23 +08:00
杨翊 SionYang
69e95fdcb3
Fix Batch register count size wrong, when batch register sereval time. (#11058) 2023-08-31 13:38:43 +08:00
ethenoscar2011
a2c6e74500
[ISSUE #10975] Fix gRpc reconnect will cause service offline after next register connection come in (#10976)
* 修复服务集群模式下客户端grpc断开重连后,非连接节点没有清理过期任务导致实例上线状态丢失造成服务异常的BUG

* Update DistroClientDataProcessor.java
2023-08-21 11:00:06 +08:00
Sunrisea
d756cdc6de
[ISSUE #10734] Optimize the param check implementation logic (#10955)
* For #10734,优化实现逻辑,提高扩展性,为动态变更限流规则预留接口

* For #10734,优化实现逻辑,提高扩展性,为动态变更参数校验规则预留接口
2023-08-14 14:55:49 +08:00
blake.qiu
8370124889
feat(#5608 && #10223): When the custom instance id is empty, the id will be automatically generated. (#10812) 2023-08-01 15:40:31 +08:00
lu-xiaoshuang
4321e777a4
bugfix for PersistentClientOperationServiceImpl log (#10825) 2023-07-25 11:07:11 +08:00
Sunrisea
8adca685f6
[ISSUE #10734] Refactor the ParamChecker and ParamExtractor (#10775)
* For #10734,refactor the paramextractor and ParamChecker

* For #10734,alter the rules of ParamCheck

* For #10734,alter the rules of ParamCheck

* For #10734,fix bug

* For #10734,fix bug and alter the ParamCheckRules.java

* For #10734,fix code style

* For #10734,fix the param check rules

* For #10734,implement the server param check config

* For #10734,optimize the logic

* For #10734,optimize the logic

* For #10734,optimize the logic
2023-07-19 16:34:03 +08:00
Sunrisea
c7a20bd132
[ISSUE #10734] Implement http request param check filter and http param extractors (#10758)
* For #10734,Implement grpc server interceptor and grpc param extractors

* For #10734,add unit test for grpc server interceptor and grpc param extractors

* For #10734,alter the test case

* For #10734,delete the ConnectionSetupRequestParamExtractor

* For #10734,add the naming http request param check filter and implement the naming http request param extractors

* For #10734,add unit test for naming http request param extractors

* For #10734,Implement grpc server interceptor and grpc param extractors

* For #10734,add unit test for grpc server interceptor and grpc param extractors

* For #10734,delete the ConnectionSetupRequestParamExtractor

* For #10734,add the naming http request param check filter and implement the naming http request param extractors

* For #10734,add unit test for naming http request param extractors

* For #10734,add the config http request param check filter and implement the config http request param extractors and unit test

* For #10734,add the console http request param check filter and implement the console http request param extractors and unit test

* For #10734,fix code style

* For #10734,alter the logic of exception handle in filter

* For #10734,fix code style
2023-07-11 17:52:54 +08:00
chenyiqin
653d16da67
report value change event to update SwitchDomain after load snapshot (#10694) 2023-07-03 14:18:28 +08:00
chenyiqin
eec0585d55
Report deregister event if read snapshot file (#10468)
* Report deregister event if read snapshot file

* fix checkstyle

* refactor the logic of refreshing clients in memory

* Format the log print

* replace list by set, and use Client#putServiceInstance replace Client#addServiceInstance
2023-06-26 09:41:09 +08:00
杨翊 SionYang
9d70b40e1e
For #10566, Use ClientReleaseEvent replace ClientDisconnectEvent. (#10557) 2023-05-26 17:40:58 +08:00
杨翊 SionYang
dced8805f2
For #10056, set Revision of client for distro sync. (#10553) 2023-05-26 15:52:58 +08:00
杨翊 SionYang
cf59d62260
HessianSerializer add whitelist. (#10542) (#10546)
* HessianSerializer add whitelist. (#10542)

* HessianSerializer add whitelist.

* Handle exception in onApply and onRequest to save the stateMachine.

* Add new ut for HessianSerializer

* Fix unit test.

* For checkstyle.
2023-05-26 09:31:55 +08:00
chenyiqin
7c3518e7ca
Fix npe when concurrent operations for client (#10467) 2023-05-12 10:15:51 +08:00
liqipeng
2b218432bc
Fix incorrect service revision in log. (#10420) 2023-05-10 13:43:11 +08:00
杨翊 SionYang
c43cb682f0
Merge pull request #10459 from alibaba/develop#10361
[ISSUE#10361]
2023-05-09 18:28:06 +08:00
ZhangShenao
662e3fce61
[ISSUE #10400] Use Generic Type in NamingConfig (#10455) 2023-05-09 15:56:49 +08:00
KomachiSion
607074c877 Make HealthController not strongly depend config and naming module. 2023-05-09 14:43:25 +08:00
KomachiSion
576225485e Move TimerContext to sys module and add new one single thread to snapshot for derby. 2023-04-25 14:46:38 +08:00
KomachiSion
802bacafbe Add module enabled packages scan filter. 2023-04-23 15:57:46 +08:00
杨翊 SionYang
0e0a73e025
Revert "[issue #10148]Replace sync forward request with async request (#10158)" (#10358)
This reverts commit a273705b8d.
2023-04-20 20:12:33 +08:00
Zhaohui Yu
a273705b8d
[issue #10148]Replace sync forward request with async request (#10158)
* Replace sync forward request with async request in DistroFilter. issue #10148

* extract method for config default headers

* add env switch for async distro forward.

* Fixed code review problems:
1. Move async forward switch from sys module to naming module.
2. use nacos code style to format code.

* Fixed nacos code checkstyle:
1. one import per Class
2. add javadoc

* In order to avoid additional overhead, move switch from GlobalConfig to ClientConfig and cache the env switch.

* Move switch from ClientConfig to DistroConfig.

* Removed unused import.

* Add test for async forward for DistroFilter

* Add license

* rename test method name

* Should enable async forward

* fixed test

* set async forward request switch to true in test

* fixed test: create and set property with MockEnvironment

* fixed check style

* move MockEnvironment init to BeforeClass

* add setter for asyncForwardRequest switch
2023-04-20 20:10:26 +08:00
Karson
916534ecfc
Add unit test for api module (#10316)
* add some unit test for api module.

* fix code style error
2023-04-13 19:03:55 +08:00
lllwd
2bb2b9d21d
selector avalanche protection (#10184) 2023-04-10 10:46:15 +08:00
杨翊 SionYang
ced2f1d9ed
Add unit test for api module (#10241)
* Add more situation UT for NetUtils

* Add UT for api module selector package

* Add UT for api module exception package

* Add UT for api module cmdb package
2023-03-31 16:41:11 +08:00
Karson
fe5002f485
Add some unit test for V2Controller (#10143)
* add unit test for HealthController

* for rerun ci

* add unit test for CatalogControllerV2
2023-03-21 15:28:32 +08:00