Commit Graph

1232 Commits

Author SHA1 Message Date
杨翊 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
WangLiang/王良
a397c10a54
Optimize the nacos-client/pom.xml for exclude google/**/*.proto (#9982)
* Optimize the pom.xml of the nacos-client

* optimize pom

* exclude `google/**/*.proto`

* tab

* Remove dependency `io.grpc:protoc-gen-grpc-java:${version}:pom`

* revert indent

* revert native-image
2023-03-01 09:42:15 +08:00
hth
4e78a769e5
replaced report API to Grpc (#9976) 2023-02-20 09:55:34 +08:00
杨翊 SionYang
9ebf5aeade
Judge the message whether null for metadata processor. (#9951) 2023-02-15 10:39:39 +08:00
杨翊 SionYang
1ef245d058
Add Unit test for api naming remote request. (#9916)
* Add Unit test for api naming remote request.

* For checkstyle.
2023-02-08 13:30:38 +08:00
陈浩 Nineteen
8c90f892b4
fix batchRegister authentication (#9899) 2023-02-05 16:06:53 +08:00
云野
71389b0f56
add feature -- list instance record which enabled was false (#9855) 2023-02-02 10:50:16 +08:00
杨翊 SionYang
fee349b667
Fix #9861, auth check before distro filter. (#9871) 2023-01-28 11:11:29 +08:00
gongzhongqiang
708387c277
fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
zz630
20145fd256
enhancement: CloseableHttpAsyncClient does not clean up expired and i… (#9727)
* enhancement: CloseableHttpAsyncClient does not clean up expired and invalid connections (#9708)

* enhancement: CloseableHttpAsyncClient does not clean up expired and invalid connections (#9708)

* style:satisfy style/NacosCheckStyle.xml

* add unit test(#9708)

* Revert "add unit test(#9708)"

This reverts commit 939905cb56f30af4d0ec35543d6d630f0777eb98.

* add unit test
2023-01-05 10:04:27 +08:00
nov.lzf
69047073c6
修改长连接request response 类注册逻辑,由类扫描改成手动注册 (#9738)
* 修改request response 类加载逻辑,有类扫描改成手动注册

* 优化注册方式,直接SPI注册payload
2022-12-21 19:56:21 +08:00
杨翊 SionYang
dfcdd391af
Add auth for some v2 api. (#9671) 2022-12-08 10:31:32 +08:00
drgnchan
5be6385563
polish: reduce magic value of 'NACOS_SERVER_HEADER' (#9663) 2022-12-06 16:16:21 +08:00
nov.lzf
acc8ab46cf
Refactor connection limit module to plugin (#9653)
* 限流插件提交

* 限流插件提交

* 限流插件提交

* 限流插件重构提交

* connection control test case submit

* tps control test case submit

* tps control test case submit

* tps control test case submit

* exact model has higher priority

* exact model has higher priority

* tpsreporter

* tpsreporter

* tpsreporter

* check style

* log optimize

* interceptor

* checkstyle

* tps check

* configController query http

* rename component

* 优化参数命名

* 优化参数命名

* 优化参数命名

* 优化参数命名

* optimize connection manager

* optimize connection manager

* optimize connection manager

* optimize connection manager

* interceptor to mse

* Monitor Model

* Monitor Model

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* opensource submit

* opensource submit

* check style

* check style

* pmd ,rat

* update db params

* test case fix

* 简化开源反脆弱实现

* test case

* test  case fix

* 修复单测

* 修复单测

* 修复单测
2022-12-06 16:15:51 +08:00
hth
0e346f0024
Code optimization, remove useless code. (#9620)
* Code optimization, remove useless code.

* code optimization
2022-11-25 14:50:44 +08:00
zz630
7ce4dcc22c
Update HttpClientManager.java (#9477)
fix #9474
2022-11-22 09:50:22 +08:00
胡俊
0f5afa8faa
解决服务元数据清理逻辑导致的反注册失败问题 https://github.com/alibaba/nacos/issues/9586 (#9587) 2022-11-17 10:40:54 +08:00
李晓双 Li Xiao Shuang
e8d71359d3
Modify the method modifier of NacosApplicationListener to default (#9460) 2022-11-04 13:54:06 +08:00
Weizhan Yun
506bc26f4d
[ISSUE #9393] 设置线程为守护线程,保证在main线程推出时应用程序能过正常关闭。 (#9396)
* 设置线程为守护线程,保证在main线程退出时应用程序能过正常关闭。

* graceful shutdown naming executetask engine.
2022-11-03 13:44:00 +08:00
KomachiSion
f56dedc7fe Fix sync connection client not removed. 2022-10-27 12:11:06 +08:00
KomachiSion
8410fbccf3 Merge remote-tracking branch 'upstream/2.2.0' into asoc2022_issue#8461
# Conflicts:
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java
2022-10-25 14:52:32 +08:00
Liu Yixiao
03345fd923
[ISSUE #8461] Enhance Nacos monitor observability system (#9038)
* Enhance MetricsMonitor with several new metrics

* Add config read and write rt

* Add ServiceEvent publisher queue size

* Add fuzzy search count

* Add naming subscriber and publisher count with v1 or v2 version tag

* Add config subscriber count with v1 or v2 version tag

* Add pending push task count and empty push count metrics

* collect pending push task count by scheduled task

* add unit test for increment metrics in NacosMonitorPushResultHook

* Add topn counter container and topn config change

* Create private MeterRegistry for config change

* Add scheduled clear for config change count, add removeAll for TopnCounterMetricsContainer

* Add topn service change

* Reconstruct metrics monitor with NacosMeterRegistryCenter.

* divide globalRegistry to different modules' CompositeMeterRegistry

* Add dynamic meters refresh service for config and naming module

* fix unit test

* Add try catch when init NacosMeterRegistryCenter
2022-10-25 11:31:29 +08:00
KomachiSion
696d489423 Merge remote-tracking branch 'upstream/2.2.0' into 2.2.0-summer#8312
# Conflicts:
#	plugin/pom.xml
2022-10-24 15:37:47 +08:00
杨翊 SionYang
7a23c56822
[ISSUE#7930] 2.2.0 remove some deprecated codes (#9368)
* Remove double write switch and upgrade from 1.X switch.

* Remove IFilterConfig.java

* Remove some deprecated constants and methods

* Remove some deprecated classes in nacos-core

* Remove some deprecated config

* Remove some deprecated codes in naming module

* Remove some deprecated codes in sys module

* Fix unit test

* Try to make UdpConnectorTest pass more easier.
2022-10-21 17:44:26 +08:00
KomachiSion
f4438ac202 Follow 2.2.0 branch. 2022-10-21 15:33:04 +08:00
KomachiSion
aa6816b69f Merge remote-tracking branch 'upstream/2.2.0' into summer2022_issue#8308
# Conflicts:
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/InstanceControllerV2.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/ServiceControllerV2.java
#	naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java
2022-10-21 14:16:18 +08:00
陈浩 Nineteen
83855da734
buf fix ip count metrics (#9355)
* buf fix ip count metrics

* run ci

* run ci
2022-10-21 09:26:20 +08:00
胡俊
0bd589cb6d
[ISSUE#8857] collect client info (#9202)
* collect client info #8857

* collect client info #8857

* collect client info #8857

* collect client info #8857

* collect client info #8857

* collect client info #8857
2022-10-19 09:40:34 +08:00
杨翊 SionYang
b1ac88be78
[ISSUE#8481] Add Trace Event SPI for Naming. (#9336)
* Add Trace plugin spi.

* Add NacosCombinedTraceSubscriber

* Subscribe NamingTraceEvent when start up cluster.

* Fix test error.
2022-10-18 09:30:37 +08:00
KomachiSion
6eae075a48 Solve conflict. 2022-10-17 19:23:13 +08:00
KomachiSion
22169055ed Merge remote-tracking branch 'upstream/develop' into 2.2.0
# Conflicts:
#	naming/src/main/java/com/alibaba/nacos/naming/core/Cluster.java
2022-10-17 19:17:31 +08:00
胡俊
0834641825
[ISSUE#9323]1.x http接口服务名校验问题 (#9324)
* 1.x http接口服务名校验问题

* 1.x http接口服务名校验问题 for #9323
2022-10-14 14:34:50 +08:00
Karson
a78ee54007
[ISSUE #6876] Concurrent instance deregiste NullPointerException (#9287)
* fix issue #6876 .

* reset properties.
2022-10-10 15:20:17 +08:00
Pixy Yuan
9c771cf2c3
[ISSUE #9277] publisherIndexes clean the service key when no instances anymore. (#9278) 2022-10-10 09:51:15 +08:00
杨翊 SionYang
f272c36df7
[ISSUE#9210] ConnectionBasedClient support add revision (#9239)
* ConnectionBasedClient support add revision

* getRevision when get verifydata.
2022-09-29 15:55:43 +08:00