Commit Graph

414 Commits

Author SHA1 Message Date
ZZQ的
80078ae8ee
[ISSUE#3102] nacos-common module ArrayUtils、StringUtils (#6211)
* add ArrayUtils and TestClass

* modified StringUtils for remove common-lang3

* add Comment for StringUtils, Completion unit test

* fix variable name error and erro test

* Optimize the code.

* Edit author
2021-07-01 14:28:49 +08:00
孙继峰
16734cdec9
[ISSUE #5095] Add unit test for InternetAddressUtil (#6222)
* add unit test to InternetAddressUtil

* inline variable

* simplify assert
2021-07-01 11:33:21 +08:00
孙继峰
f36556657f
[ISSUE #6197] Use java.util.Objects instead of com.alibaba.nacos.common.utils.Objects (#6218) 2021-07-01 11:32:34 +08:00
ZZQ的
4cd6c58a95
[ISSUE #6198] BUG nacos-common>utils>StringUtils.join method NullPointerException #6198 (#6213)
* [ISSUE #6198] fix bug

* format code

* Modify Comment.Remove toString()
2021-06-30 19:13:40 +08:00
孙继峰
8dcf38f65b
[ISSUE #5095]Add unit test for VersionUtils (#6195)
* replace with try with resource

* replace with lambda

* add unit test

* inline variable
2021-06-30 10:18:29 +08:00
赵延
3fd77bc7e0
If the client already disconnect, ignore this request to avoid NPE. (#6175)
* if the client already disconnect, ignore this request to avoid npe.

* unify code with DistroClientDataProcessor.

* print warn info when client already disconnect.

* transfer client check logic to method.

* if client is not ephemeral, is illegal.
2021-06-30 10:15:06 +08:00
杨翊 SionYang
f2676bc6ca
[ISSUE#6129] Add ServerConfigChangeEvent when config file changed. (#6130)
* Add ServerConfigChangeEvent when config file changed.

* Upgrade config after notify ServerConfigChangeEvent
2021-06-22 14:39:37 +08:00
孙继峰
fb3e5ad290
simplify Assert (#6095) 2021-06-17 19:17:37 +08:00
realJackSun
7f1f917839
[5989] Fix unit tests in nacos-common (#5994) 2021-06-08 13:24:48 +08:00
Pixy Yuan
4cbc6a4960
[ISSUE #5952] Feature make naming rpc client aware of server list change (#5974)
* [ISSUE #5952] Optimize rpcClient creation lock.

* [ISSUE #5952] Make naming rpc client aware of server list change.
2021-06-07 20:07:39 +08:00
nov.lzf
de6a4b803d
client aware server list change (#5952) 2021-06-04 19:34:38 +08:00
nov.lzf
55c6f44413
fix query sla multi connection model ;add rpc client error log; optimize client shutdown (#5949)
* fix multi connection model ,query sla

* add rpc client error log

* optimize client shutdown

* optimize client log
2021-06-04 15:27:32 +08:00
nov.lzf
3dc1a8cd96
fix ak sk and some tiny optimize (#5937)
* fix ak bug.

* fix ak bug.

* revert version
2021-06-04 09:41:40 +08:00
杨翊 SionYang
1d5a6605ee
[ISSUE#5918] Refactor event publisher in naming module to fix event without orders. (#5930)
* Rollback #5778.

* Add method to register custom sharded event publisher

* Make naming module event use custom sharded publisher
2021-06-03 12:53:29 +08:00
李晓双 Li Xiao Shuang
e199a5ee64
[ISSUE #5774] improve the code quality for naming core (#5914)
* mprove the code quality for naming core

* fix build
2021-06-03 09:59:52 +08:00
孙继峰
15c71831e7
[ISSUE #5765] fix localhost not match ip (#5852)
* rename IPUitl to InternetAddressUtil

* move isDomain to InternetAddressUtil

* [ISSUE #5765] fix localhost not match ip

* fix typo

* delete the verification IP, follow the single responsibility principle
2021-05-27 19:01:39 +08:00
xiaoheng1
6831de3111
Publisher code optimization (#5778)
* fix #5762 Publisher code optimization

* there is no subscriber, return directly.
2021-05-25 09:28:51 +08:00
brotherlu-xcq
f9d696beb4
[code quality] [nacos-common] [tls/utils] remove unnecessary symbol, export constant in class, change the Chinese javadoc to English (#5821) 2021-05-24 14:15:11 +08:00
brotherlu-xcq
4dafe6fa86
[code quality] [nacos-common] [remote/spi] remove unnecessary symbol, export constant in class. (#5820) 2021-05-24 14:10:38 +08:00
brotherlu-xcq
5089af1a1e
[code quality] [nacos-common] [notify/http] remove unnecessary symbol, export constant in class. (#5819) 2021-05-24 14:05:28 +08:00
KomachiSion
cf5a171ac5 Merge remote-tracking branch 'upstream/develop' into feature_support_grpc_core
# Conflicts:
#	NOTICE
#	api/pom.xml
#	common/src/main/java/com/alibaba/nacos/common/notify/DefaultPublisher.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java
#	naming/src/test/java/com/alibaba/nacos/naming/consistency/persistent/impl/NamingSnapshotOperationTest.java
#	naming/src/test/java/com/alibaba/nacos/naming/core/DomainsManagerTest.java
#	naming/src/test/java/com/alibaba/nacos/naming/healthcheck/ClientBeatCheckTaskTest.java
#	pom.xml
#	test/src/test/java/com/alibaba/nacos/test/core/JacksonUtils.java
2021-05-14 11:04:52 +08:00
孙继峰
4ecf293fa7
[ISSUE #5704] adjust code style (#5705) 2021-05-14 10:07:52 +08:00
孙继峰
7ed7b45772
[ISSUE #5538] fix test case fail (#5620) 2021-05-14 09:38:20 +08:00
孙继峰
818d37b71c
delete duplicated dependency (#5622) 2021-05-10 10:43:58 +08:00
wql
a713203c66
IPv6 and IPv4 check rules are optimized. splitIPPortStr method adds IPv4 check, and the optimized method does not affect the startup of container environment (#5514)
* The IPv6 judgment logic in this method will obtain IP address according to the host. In the container environment, K8S has not allocated IP to this pod, and then the judgment will report an error. After finding this problem, I gave feedback to remove the IPv4 judgment, but this problem still exists in IPv6. Suggested to remove the verification logic can be in other ways to optimize.

* Revert "The IPv6 judgment logic in this method will obtain IP address according to the host. In the container environment, K8S has not allocated IP to this pod, and then the judgment will report an error. After finding this problem, I gave feedback to remove the IPv4 judgment, but this problem still exists in IPv6. Suggested to remove the verification logic can be in other ways to optimize."

This reverts commit a112e52

* Both IPv4 and IPv6 validation rules adopt regular validation. In order to prevent the container from adding domain name rule validation in the case of domain name resolution deployment, the logic of removing Chinese slogan should be added before the rule validation in IPv6.

* Optimize and add licenses according to Ali's protocol

* The isDomain method is changed to validate only rules

* Format to optimize
2021-04-30 09:14:08 +08:00
brothelul
d65453f163
format the code in DefaultPublisher.java, log.error and @Override issue (#5515) 2021-04-29 18:57:20 +08:00
KomachiSion
2847373fd0 Solve conflict 2021-04-27 16:19:56 +08:00
KomachiSion
92da848375 Merge remote-tracking branch 'upstream/develop' into merge-1.X-to-2.0
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/CacheData.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	client/src/main/java/com/alibaba/nacos/client/naming/core/PushReceiver.java
#	console/src/main/resources/static/css/main.css
#	console/src/main/resources/static/js/main.js
#	naming/src/main/java/com/alibaba/nacos/naming/core/SubscribeManager.java
#	naming/src/test/java/com/alibaba/nacos/naming/core/SubscribeManagerTest.java
#	test/src/test/java/com/alibaba/nacos/test/BaseTest.java
2021-04-27 15:57:24 +08:00
孙继峰
da3a1ea796
[ISSUE #5380] Use assert instead of System.out (#5472)
* use assert instead of System.out

* move test case, there is no file named ParamCheckUtil.java
2021-04-25 10:03:28 +08:00
孙继峰
3ce1cbab8b
fix #5390 (#5391) 2021-04-19 10:56:43 +08:00
杨翊 SionYang
73eea9c0bb
Use ThreadUtil and EnvUtil replace Runtime.availableProcessor (#5388) 2021-04-16 17:32:14 +08:00
xiaoheng1
acb02f6bf3
[ISSUE #5370]Modify the Chinese comments in MD5Utils to English (#5371)
* fix #5370 Modify the Chinese comments in MD5Utils to English

* code format
2021-04-16 11:00:11 +08:00
KomachiSion
51cc2b1b4b Merge remote-tracking branch 'upstream/develop' into feature_support_grpc_core
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/CacheData.java
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	client/src/test/java/com/alibaba/nacos/client/config/common/GroupKeyTest.java
#	common/src/test/resources/META-INF/services/com.alibaba.nacos.common.spi.SpiTestInterface
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java
#	console/src/main/resources/static/css/main.css
#	console/src/main/resources/static/js/main.js
#	istio/src/main/java/com/alibaba/nacos/istio/mcp/NacosMcpService.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java
#	naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java
2021-04-13 14:28:30 +08:00
杨翊 SionYang
e689c1a3a1
Remove blocked thread for Protocol metadata (#5354) 2021-04-13 14:12:19 +08:00
Wu Zhiguo
9bcb901174
Fix some typo (#5260)
* fix some typo

* rollback some comment format
2021-04-03 12:57:57 +08:00
nov.lzf
46179d6664
fix cluster reconnection bug. (#5265) 2021-04-01 18:45:23 +08:00
杨翊 SionYang
d146e057c4
Fix ThreadPool usage problem and add some monitor for distro (#5237) 2021-03-30 16:27:41 +08:00
nov.lzf
a6a254a1c0
fix thread pool (#5233)
* fix thread pool

* fix log
2021-03-29 21:31:06 +08:00
赵延
cb289d31f7
fix thread name generate strategy. (#5139) 2021-03-23 09:25:35 +08:00
nov.lzf
9bb08d9f4d
remote reconnect bugfix (#5136)
* remote reconnect bugfix

* remote reconnect bugfix
2021-03-19 09:30:08 +08:00
KomachiSion
bd4b63d834 Merge remote-tracking branch 'upstream/feature_support_grpc_core' into develop-merge-to-2.0 2021-03-18 13:38:35 +08:00
nov.lzf
5fc13e9654
add client ip (#5134)
* add client  ip

* checkstyle fix

* wait to register connection setup
2021-03-18 13:22:10 +08:00
KomachiSion
6cda5ad55a Merge remote-tracking branch 'upstream/develop' into develop-merge-to-2.0
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java
#	client/src/main/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxy.java
#	client/src/test/java/com/alibaba/nacos/client/config/impl/YmlChangeParserTest.java
#	common/src/main/java/com/alibaba/nacos/common/http/param/Header.java
#	common/src/main/java/com/alibaba/nacos/common/utils/ConcurrentHashSet.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java
#	console/src/main/resources/static/js/main.js
#	core/src/main/java/com/alibaba/nacos/core/cluster/ServerMemberManager.java
#	core/src/main/java/com/alibaba/nacos/core/utils/Loggers.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java
#	naming/src/main/java/com/alibaba/nacos/naming/healthcheck/HealthCheckReactor.java
#	pom.xml
2021-03-18 12:08:45 +08:00
haoyann
4029d32e01
fix ConcurrentHashSet compatibility problems (#5122) 2021-03-17 09:49:38 +08:00
nov.lzf
5247548e86
shade client and using remote ip from header (#5068)
* shade client

* shade client

* fix default cluster port

* rollback client ip

* using remote ip from header

* using remote ip from header

* using remote ip from header
2021-03-10 11:18:37 +08:00
haoyann
d80a272646
Remove extra semicolons (#5063) 2021-03-10 10:00:04 +08:00
nov.lzf
3afa7eac89
shutdown long connection where server rollback; use client submit client ip (#5013)
* use  client ip from connection setup request.

* reset remote connection for rollback

* npe bugfix

* npe bugfix

* stop long connection where server rollback

* stop long connection where server rollback
2021-03-05 09:28:01 +08:00
haoyann
6870e57e2a
Closeable interface remove public (#4971) 2021-03-01 10:01:45 +08:00
nov.lzf
2315a745d3
tag publish bugfix; ignore server port for connection reset request. (#4947)
* grpc port modified;change notify bugfix.

* default member port fix

* modify grpc port to offset

* modify grpc port to offset
2021-02-25 10:38:25 +08:00
杨翊 SionYang
3a82d5d987
Add some enhancements (#4881)
* Add some enhancements

* Add tps monitor for naming push

* Add some enhancement for client
2021-02-05 10:15:31 +08:00