Commit Graph

509 Commits

Author SHA1 Message Date
Daydreamer-ia
afbfed2954 Remove the unused filed. 2022-09-08 18:34:03 +08:00
Daydreamer-ia
89b450537e Add the response to setup request. 2022-09-08 18:23:35 +08:00
Daydreamer-ia
138f0758eb Remove dead code. 2022-09-03 16:12:25 +08:00
Daydreamer-ia
ac2523ab7d Add the priority to AbilityControlManager. 2022-09-03 14:11:55 +08:00
Daydreamer-ia
182b821938 Remove the component listening to cluster ability, disable the cluster capability table when the connected server does not support capability negotiation. 2022-09-02 21:56:03 +08:00
Daydreamer-ia
118cde52e7 Separate client capability and server capability: ClientAbilities and ServerAbilities. 2022-09-01 19:33:08 +08:00
Daydreamer-ia
a47f052c90 Remove the AbilityHandlePreProcessor and AbilityStatus. Change the way to get or remove AbilityTable for RpcClient. 2022-08-30 21:36:24 +08:00
Daydreamer-ia
de9e113e24 Fix checkstyle 2022-08-28 19:10:55 +08:00
Daydreamer-ia
838c3d0ded Adapt the support of new ability control. 2022-08-28 18:20:35 +08:00
Daydreamer-ia
ce4fb189b8 Fix the bug that cannot load AbilityControlManager. 2022-08-28 18:08:29 +08:00
Daydreamer-ia
4275358975 Add the default implements for client and server. 2022-08-28 17:40:08 +08:00
Daydreamer-ia
4098297e51 Add the base implements for ability control. 2022-08-28 17:38:08 +08:00
Daydreamer-ia
a15ef8eb3a Add the base interface and entity for ability control. 2022-08-28 17:35:39 +08:00
chenhao26
3c8c6a7a14
add some utils UT (#9006)
add some utils UT
2022-08-22 15:43:22 +08:00
刘邵宇 ShaoyuLiu
3f75b3a2c5
[ISSUE #8993]Close input stream and output stream by try with resource[nacos-common] (#8997)
* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common]

* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common]

* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common]
2022-08-22 09:40:53 +08:00
Karson
3839cdc307
add unit test for ReflectUtils (#8999)
* add unit test for ReflectUtils

* reformat code
2022-08-22 09:38:01 +08:00
shiherua
ec134a3bc4
Improve code specifications. (#8965)
Flip the call to equals method to avoid null pointer exception.
2022-08-17 14:11:29 +08:00
liushaoyu-soft
474b25dff5
Update IoUtils.java (#8948)
An IOException has been catch,so throws IOException Is invalid
2022-08-12 16:42:38 +08:00
liushaoyu-soft
0c61c5d5eb
[ISSUES#8905]simplify some code (#8908) 2022-08-11 14:32:50 +08:00
ZhangShenao
5a9b1e961f
Add Generic Type for Simple Cache Map (#8812) 2022-08-01 15:33:54 +08:00
GuiShao
56104495da
[ISSUE#8481]Unified TRACE capacity building (#8805)
* [ISSUE#8481]Unified TRACE capacity building

* [ISSUE#8481]Unified TRACE capacity building
1. Event type add to traceEvent.
2. The event about instance add instancePort.
3. Add health check type to healthChangeEvent.
4. Other fixup.
2022-07-29 16:22:40 +08:00
KomachiSion
b0af8087b8 Add exception detail stacks when connect to server failed. 2022-07-26 15:12:01 +08:00
Oliver
667a34d7aa
Remove repeated conditional test (#8732) 2022-07-14 09:28:26 +08:00
MajorHe1
68b521679c
[ISSUE #8709] check serverList size before reconnect to server (#8710)
* [ISSUE #8709] check serverList size before reconnect to server

* use CollectionUtils.isEmpty to judge whether server list  is empty

Co-authored-by: Oliver <wqdyxnbd@163.com>

Co-authored-by: Oliver <wqdyxnbd@163.com>
2022-07-08 11:52:11 +08:00
xiaochangbai
ae1a1bec93
optimize: port offset constant (#8652)
* optimize: port offset constant

* optimize: code formatting

* remove extra spaces
2022-07-01 10:00:42 +08:00
liqipeng
bbbba1f453
Optimize GrpcUtils to reduce memory and cpu cost (#8593) 2022-06-23 11:12:09 +08:00
Cherish 蔡梦缘
747e2f9c25
feat(#8472): [Dependency Governance] replace org.apache.commons.logging.Log with org.slf4j.Logger. (#8472) (#8578) 2022-06-16 10:03:53 +08:00
GuiShao
a7d8066e41
[ISSUE#8481]Unified TRACE capacity building (#8521) 2022-06-14 15:39:46 +08:00
david6969xin
fa5fbd79e1
[ISSUE#8485] (module-common) replace the type specification in this constructor call with the diamond operator ("<>") (#8554) 2022-06-13 10:32:58 +08:00
liqipeng
f7a28105b2
[ISSUE #8428] fix naming subscribe bug when multiple NamingService (#8433) 2022-05-27 14:05:05 +08:00
ZhengBing520
7ca069db60
[ISSUE #8275] Fix ClassCastException: io.grpc.ClientInterceptors$InterceptorChannel cannot be cast to io.grpc.ManagedChannel (#8374) 2022-05-23 16:50:25 +08:00
Karson
89a0f89a8b
optimize IoUtils and Add some unit test (#8398)
* optimize IoUtils and Add some unit test

reformat codes

fix Too many unapproved license issue

fix Too many unapproved license issue

fix Too many unapproved license issue

fix Too many unapproved license issue

fix Too many unapproved license issue

* fix test case issue

* fix test case issue
2022-05-23 15:16:33 +08:00
Oliver
dbc1be8d8d
[ISSUE #8153]Fix AutoExpireCache NPE (#8162)
* Fix AutoExpireCache NPE

* add synchronized

* restore test

* add Null verification

* restore variable definition

* Fix NPE

* Add UT

* checkstyle
2022-05-20 14:52:26 +08:00
Endwas
b928568ce8
[ISSUE #7315] Unfiy Map's get and put methods by computeIfAbsent In ThreadPoolManager (#7304)
* Unfiy Map's get and put methods by computeIfAbsent In ThreadPoolManager

What is the purpose of the change
Optimization and tidy codes.

Brief changelog
Unfiy get/put by computeIfAbsent.

Verifying this change
eclipse-pmd was used to verify the changes

* Unfiy Map's get and put methods by computeIfAbsent In ThreadPoolManager

What is the purpose of the change
Optimization and tidy codes.

Brief changelog
Unfiy get/put by computeIfAbsent.

Verifying this change
eclipse-pmd was used to verify the changes
2022-05-16 10:36:04 +08:00
david6969xin
e17ea65954
[ISSUE#8358] make this anonymous inner class a lambda (common module) (#8368) 2022-05-16 10:18:01 +08:00
Oliver
f39add7900
Replace keySet() to entrySet() (#8281) 2022-04-29 23:02:32 +08:00
onewe
8980a960aa
[ISSUE #7487] Add generics for the CacheBuilder. (#7490) 2022-04-27 13:52:49 +08:00
nov.lzf
2e9c09d367
fix different client worker share same localsnapshot bug ,add properties to control whether load snaoshot content on startup in CacheData (#8202) 2022-04-24 13:33:28 +08:00
Oliver
a9e2cbd4d8
Set interrupted flag to caller (#8116) 2022-04-20 10:49:00 +08:00
Karson
44850cc732
[Optimize] RpcClient constructor (#8113)
* optimize RpcClient constructor

* edit RpcClient.java
2022-04-18 11:38:56 +08:00
Oliver
d52db5c81d
[Optimize] Use StandardCharsets.UTF_8 replace Charset.forName("UTF-8") (#8115)
* Improve performance

* checkstyle

* checkstyle
2022-04-11 10:10:01 +08:00
liqipeng
7319ff13c9
Change implementation of JacksonUtils methods about byte operation to reduce memory cost, especially when DistroProtocol fetching full data from peer node in the initialization phase. (#8072) (#8100) 2022-04-08 13:33:52 +08:00
lmw
c51b405565 [#8035] Missing serialVersionUID when class implements Serializable interface 2022-03-30 20:34:28 +08:00
chenhao26
b4cc3fcddb
Optimize HTTP constants (#7998)
* Optimize HTTP constants

* check nacos style

* check nacos style2

* check nacos style3

* deleet Unused constants in UtilAndComs
2022-03-25 16:05:42 +08:00
Pixy Yuan
2d0a8add41
Support cluster grpc client to set pool size (#7993)
* [ISSUE #7992] Support ThreadUtils preset processors count by property or env.

* [ISSUE #7992] Add thread pool params for cluster grpc client.
2022-03-25 15:04:12 +08:00
李晓双 Li Xiao Shuang
88fb26cfc6
[ISSUE #5695] Add config encrypt spi for nacos server. (#7934)
* [ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0 (#6655)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* fix code quality (#6727)

* [ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0, EncryptedDataKey is persisted (#6740)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化

* [ISSUE#5695] Summer2021 Cache encryptedDataKey  (#6878)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化

* 秘钥缓存到内存中

* 解决冲突

* 修改filter继承AbstractConfigFilter (#6879)

* [ISSUE#5695] Summer2021   EncryptedDataKey is persisted to Derby (#6882)

* [ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0 (#6655)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* fix code quality (#6727)

* # This is a combination of 6 commits.tree cf7a399f99c4d81b8667c8de06f5ceb8c79fb6f0
parent 8024ecf31bf23a9edab416be8a3bfd1c0e48ce5e
author 李晓双 Li Xiao Shuang <644968328@qq.com> 1630028256 +0800
committer lixiaoshuang <644968328@qq.com> 1631804378 +0800

# This is a combination of 3 commits.
# This is the 1st commit message:

[ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0, EncryptedDataKey is persisted (#6740)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化
# This is the commit message #2:

[ISSUE#5695] Summer2021 Cache encryptedDataKey  (#6878)

* Defines the interface

* 增加aes实现

* 客户端、服务端加解密实现

* 客户端、服务端加解密实现

* 秘钥持久化

* 秘钥持久化

* 秘钥缓存到内存中

* 解决冲突
# This is the commit message #3:

修改filter继承AbstractConfigFilter (#6879)


# This is the commit message #6:

客户端、服务端加解密实现

* parent 8024ecf31bf23a9edab416be8a3bfd1c0e48ce5e
author 李晓双 Li Xiao Shuang <644968328@qq.com> 1630028256 +0800
committer lixiaoshuang <644968328@qq.com> 1631805204 +0800

parent 8024ecf31bf23a9edab416be8a3bfd1c0e48ce5e
author 李晓双 Li Xiao Shuang <644968328@qq.com> 1630028256 +0800
committer lixiaoshuang <644968328@qq.com> 1631804378 +0800

[ISSUE#5695] Add a plugin SPI for configuration encryption and decryption for Nacos 2.0, EncryptedDataKey is persisted (#6740)

* 配置加解密插件

* derby支持秘钥存储

* 克隆功能兼容配置加解密 (#6913)

* [ISSUE#5695] Summer2021 Import/export compatible with configuration encryption and decryption (#6956)

* 克隆功能兼容配置加解密

* 导入导出兼容配置加解密

* 秘钥base64编码、更换AES加密模式 (#6974)

* [ISSUE#5695] Summer2021 add unit test for ConfigCryptoFilter (#6991)

* add unit test for ConfigCryptoFilter

* add unit test for ConfigCryptoFilter

* [ISSUE#5695] Summer2021 add unit test for CryptoExecutor (#6990)

* add unit test for CryptoExecutor

* add Copyright

* [ISSUE#5695] Summer2021  add unit test for CryptoManager (#6989)

* add unit test for CryptoManager

* add unit test for CryptoManager

* [ISSUE#5695] Summer2021 add unit test for AesCrypto (#6988)

* add unit test for AesCrypto

* update AesCryptoTest

* Increased iv randomness

* add default Iv

* fix javadoc

* fix unit test

* defining plugin intergace

* Replace the client encryption and decryption actuator

* Replace the server encryption and decryption actuator

* add unit test

* add unit test

* remove old code

* fix NacosConfigServiceTest

* Encryption and decryption to achieve migration

Co-authored-by: 杨翊 SionYang <263976490@qq.com>
2022-03-16 10:54:11 +08:00
胡俊
2e07c6a0c1
Package scan (#7917)
* PayloadRegistry update use spi

* PayloadRegistry update use spi

* PayloadRegistry update use spi

* PayloadRegistry update use spi

* add test

* update comment

* remove code
rename code
2022-03-11 15:50:44 +08:00
zrlw
bc40318c66
[develop] set default connection lease request timeout and merge default config (#7906)
* set default connection lease request timeout and merge default config

* remove useless code

* correct comments of mergeDefaultConfig
2022-03-09 16:03:27 +08:00
胡俊
fdf90133a2
[ISSUE#7886]Feature package scan (#7895)
* for #7886

* nacos style

* nacos style

* code style

* .

* scan nacos style

* class reader

* class reader

* class reader

* class reader

* add comment

* update dependency

* update dependency

* rat update
check style update

* package change

* pdm exclude

* pdm update

* comment

* comment

* change pkg  final

* code structure update

* code style

* code style update
2022-03-08 20:11:21 +08:00
胡俊
3dddb75fed
optimization append (#7798) 2022-03-03 15:03:33 +08:00