Commit Graph

477 Commits

Author SHA1 Message Date
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
zrlw
5df5baf491
log what causes I/O reactor status to STOPPED (#7723) 2022-02-21 15:47:27 +08:00
Karson
cb6526c845
[ISSUE #7837] add expire checking for AutoExpireCache in common util. (#7392) 2022-01-14 15:52:16 +08:00
shunfan-shao
a36d96acc8
Use LinkedHashMap to preserve string order (#7296)
* Use LinkedHashMap to preserve string order

* fix similar test
2022-01-09 22:31:22 +08:00
李晓双 Li Xiao Shuang
27ed668695
Strengthen the code (#7511) 2022-01-07 18:09:55 +08:00
onewe
9aeafd9359
[ISSUE #7411] fix NPE when the RpcClient shutdown (#7413)
* [ISSUE #7411] fix NPE when the RpcClient shutdown

- add unit test for this issue

* remove UnusedImports
2021-12-15 11:10:35 +08:00
caomingjie-code
f136dde8fa
优化代码。防止并发bug (#7341) 2021-12-07 10:25:01 +08:00
ethan
36f30dccd5
Add port offset configuration for the client when using reverse proxy to expose different nacos server ports (#7150) 2021-11-16 11:26:51 +08:00
吴治国
87ddbeff90
[ISSUE #6970] Add rest api v2 in core module (#7085)
* Add rest api v2 in core module

* merge cluster listNodes methods

* ut

* add beta annotation
2021-11-10 14:11:40 +08:00
赵延
1778a84964
Fix PushAckRequest mismatch problem. (#7179)
* fix PushAckRequest mismatch problem.

* add doc.

* add doc.
2021-11-08 10:23:14 +08:00
孙继峰
91706cf137
[ISSUE #6978] move unit test case that exist in integration test class (#7042)
* delete unit test case that already exist in HttpUtilsTest

* move unit test case to QueryTest

* move unit test case to ResponseHandlerTest

* delete empty test class
2021-10-11 09:50:31 +08:00
吴治国
a74eb55270
[ISSUE #5095] Add some testcases for common cache (#6950)
* add testcase for common cache

* license
2021-09-23 10:29:58 +08:00
吴治国
cdd2a8f5b8
[ISSUE #5095] Add testcase for common base64 (#6952)
* add testcase for common base64

* testcase

* license
2021-09-23 10:29:15 +08:00
吴治国
cf2b4a541a
[ISSUE #5095] Add some testcases for common executor (#6959)
* add some testcases for common executor

* style
2021-09-23 10:28:17 +08:00
BlackBAKA
1a53916329
[ISSUE #6628] Remove redundant functional interfaces (#6653) 2021-08-17 09:27:46 +08:00
secbro2
8801be513d
complete the warn log (#6646)
* complete the warn log

* format and optimize the log
2021-08-16 10:11:35 +08:00
brotherlu-xcq
46c1f7e6df
simple the logic of input RpcClient. (#6444) 2021-08-11 13:42:38 +08:00
孙继峰
2343a4ed14
add unit test to HttpUtils (#6617) 2021-08-11 13:34:18 +08:00
赵延
1a3c8cfb60
fix npe when connection is not established. (#6534) 2021-08-10 09:31:40 +08:00
孙继峰
4c1175acf0
add retryTimes check (#6594) 2021-08-09 10:05:42 +08:00
孙继峰
f91089eb90
[ISSUE #6595] Optimize RpcClient (#6596)
* replace explicit type argument with <>

* replace anonymous class with lambda

* remove redundant initializer

* format comment & log and fix typo

* add unit test to RpcClient::resolveServerInfo

* extend CollectionUtils::getOrDefault

* simplify RpcClient::resolveServerInfo

* remove unused variable
2021-08-09 09:42:37 +08:00
孙继峰
4a134b233c
add unit test to RpcClient (#6584) 2021-08-06 11:06:30 +08:00
ZZQ的
ca89efb620
remove guava Iterables (#6563) 2021-08-05 09:37:08 +08:00
ZZQ的
1119d0336f
Replace "ThreadFactoryBuilder" API with jdk API and add unit test (#6532) 2021-08-04 13:56:26 +08:00
ZZQ的
449480f68b
Refactor the cache to replace guava (#6520)
* Refactor the cache to replace guava

* Refactor CacheBuilder

* add unit test

* Format code
2021-08-03 09:30:26 +08:00
ZZQ的
b0f7bfbba7
replace "google.common.base.Preconditions" API with jdk API (#6502)
* replace "google.common.base.Preconditions" API with jdk API

* delete static method import "lenitentFoment"

* add unit test
2021-07-30 16:35:46 +08:00
ZZQ的
a729001ec5
[Reduce dependence]>[Sets] Replace "google.common.collect.*" API with… (#6445)
* [Reduce dependence]>[Sets] Replace "google.common.collect.*" API with jdk API

* delete empty line separator
2021-07-30 16:32:38 +08:00
ZZQ的
9beaacbc54
[Reduce dependence]>[Maps] Replace "google.common.collect.*" API with jdk API (#6443) 2021-07-29 10:46:22 +08:00
孙继峰
e3c9fcf2d7
[ISSUE #5095] Add unit test for RpcClientFactory (#6471)
* fix typo

* Add unit test for RpcClientFactory
2021-07-27 18:00:43 +08:00
ZZQ的
838a62cc4a
Replace "google.common.collect.Strings" API with jdk API (#6464) 2021-07-27 13:53:52 +08:00
ZZQ的
47c6706a63
[Reduce dependence]>[Lists] Replace "google.common.collect.*" API wit… (#6404)
* [Reduce dependence]>[Lists] Replace "google.common.collect.*" API with jdk API

* use elements.size to init the array length

* Replace IllegalArgumentException with NullPointerException

* Refactor CollectionUtilsTest#list()

* Add exception message

* update annotation

* update unit test method name
2021-07-27 13:47:41 +08:00
brotherlu-xcq
2b186bc3fe
[ISSUE #6367] Add IOReactorExceptionHandler to avoid IOReactor out of loop when meet unknown Network error. (#6441)
* Add IOExceptionHandler to handle the Exception form IOReactor.

* remove the systemProperties for create ConnectionManager.

* fix the javadoc.
2021-07-27 09:29:58 +08:00
ZZQ的
c52589fd03
[Reduce dependence]>[Iterators] Replace "google.common.collect.*" API with jdk API (#6447) 2021-07-26 09:29:43 +08:00