Commit Graph

742 Commits

Author SHA1 Message Date
DongYafei
5373513331
update NacosClusterControllerV2 (#9066) 2022-09-02 15:39:28 +08:00
Daydreamer-ia
41d278d6f1 Add junit test 2022-09-01 20:31:48 +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
26bbc5780b Adapt and replace old version ability api. 2022-08-28 18:45:56 +08:00
Daydreamer-ia
838c3d0ded Adapt the support of new ability control. 2022-08-28 18:20:35 +08:00
Daydreamer-ia
4275358975 Add the default implements for client and server. 2022-08-28 17:40:08 +08:00
Weizhan Yun
0ac96e1602
[ISSUE #9014] performance optimization--refacte TpsMonitorPoint (#9021)
* performance optimization

* fix check style

* fix test unit

* fix test unit for `getTimeFormatOfSecond` method.

* fix unit test  for LimiterTest.

* fix error usage case for asserEquals method;eliminate interactions between test methods
2022-08-26 09:57:34 +08:00
chenhao26
db72e4f9c1
fix LookupFactoryTest ut / ci (#8985)
* fix ci

* run ci

* check cla report

* check style
2022-08-17 20:39:42 +08:00
liqipeng
e97b695db2
[ISSUE #8345] Check cluster name in server-side when registerInstance (#8724)
* Check cluster name in server-side when register ephemeral instance

* Check cluster name in server-side when register persistent instance

* add unit test for register instance

* add unit test for NamingHttpClientProxy

* remove catching NacosException to throw NacosRuntimeException
2022-07-25 09:57:43 +08:00
Oliver
f13016af23
[Polish] Add serialVersionUID (#8733)
* Add serialVersionUID

* checkstyle

* Auto generate id
2022-07-19 10:30:26 +08:00
MajorHe1
e7498d7a4c
[ISSUE #8707] add distroKey log output when distro sync failed. (#8708)
* [ISSUE #8707] add distroKey log output when distro sync failed.

* append toString() method to log getDistroKey()

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

Co-authored-by: Oliver <wqdyxnbd@163.com>
2022-07-08 11:53:16 +08:00
杨翊 SionYang
7bb1e90549
Remove leave nacos server nodes API temporarily. (#8700) 2022-07-07 19:54:30 +08:00
无处不在
fcc9b0aef9
[fix]Fix Word Spelling 'Naocs' in RaftExecutor NameThreadFactory (#8673) 2022-07-07 10:58:12 +08:00
杨翊 SionYang
5aabba13c9
[ISSUE#8099] Fast failure for distro sync task and verify task if cluster disconnect. (#8693)
* Fast failure for distro sync task and verify task if cluster disconnect.

* Fix UnnecessaryStubbingException
2022-07-07 10:41:23 +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
f3d134d2c2
[ISSUE #8594] makes distro data load timeout can be configured. (#8595)
* makes distro data load timeout can be configured.

* specify nacos.core.protocol.distro.data.load.timeoutMs default 30s
2022-06-24 15:06:47 +08:00
Karson
e5cfd23186
Use SPI optimize StartingApplicationListener (#8547)
* Use SPI to load NacosApplicationListener

* add License des

* add License des

* add License des
2022-06-17 11:10:11 +08:00
Cherish 蔡梦缘
703925a84f
feat(#8472): [Dependency Governance] Remove useless dependencies. (#8472) (#8473) 2022-06-13 10:31:11 +08:00
david6969xin
a6e1ff9508
[ISSUE#8485] (module-core) replace the type specification in this constructor call with the diamond operator ("<>") (#8557) 2022-06-13 10:09:05 +08:00
liqipeng
4c23846cd9
fix #8169: Upgrade spring-boot version to 2.6.6 (#8184) 2022-06-06 11:28:32 +08:00
Cherish 蔡梦缘
95f3d115d8
[ISSUE #8471] has no bolt, remove bolt properties (#8475)
[clean code]: has no bolt, jraft-core exclude bolt and use rpc-grpc-impl. (#8471)
2022-06-01 14:39:32 +08:00
david6969xin
ceb7fa078a
[ISSUE#8358] make this anonymous inner class a lambda (core module) (#8387) 2022-05-18 10:25:55 +08:00
lpaz010
f21b332f98
reduce magic value (#8395) 2022-05-18 10:16:33 +08:00
yanhom
d89076b3e6
Support for ibm J9 (#8325)
* support for ibm J9

* format code, add newline at end of file

* format code

* use nacos code style format codes
2022-05-13 11:03:01 +08:00
onewe
8980a960aa
[ISSUE #7487] Add generics for the CacheBuilder. (#7490) 2022-04-27 13:52:49 +08:00
Cherish 蔡
b718cbf8f2
feat(#5346): reset raft cluster ops for no leader, use JRaft Api resetPeers. (#8220) 2022-04-22 16:49:16 +08:00
onewe
19185cb338
[ISSUE #8161] Icon-font-path and font-custom-path use relative path instead of absolute path (#8172)
- banner.txt use `server.servlet.contextPath` instead of nacos

Close #8161
2022-04-18 11:27:39 +08:00
Cherish 蔡
b9dfe3ff9b
V2.x fix(#6273): server/leave, add end conditions for cluster notifications. (#8133)
* fix(#6273): server/leave, add end conditions for cluster notifications.

* fix(#6273): server/leave, add end conditions for cluster notifications.
2022-04-13 10:25:31 +08:00
onewe
d789114cfc
[ISSUE #8092] Destroy the thread pool of TpsMonitorManager when the nacos is shutting down (#8105)
- add destroy method

Close #8092
2022-04-11 10:25:32 +08:00
onewe
8292d9e16c
[ISSUE #7999] Fix config that can't read environment args (#8055)
- add unit test
- resetConfig method move to subclass's constructor
2022-04-07 10:20:13 +08:00
chaos
13719df7a0 Improve the code readability of TimerContext replace if with switch case 2022-03-29 09:36:05 +08:00
MajorHe1
5665cfe072
[ISSUE #7966] modify returned msg in Auth/Distro/Curcuit-Filter when internal server error (#7967)
* [ISSUE #7966] modify returned msg in Auth/Distro/Curcuit-Filter when internal server error

* [ISSUE #7966] add log output instead of return stacktrace
2022-03-28 10:22:55 +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
赵延
cc549cbac7
follower state machine ignore read operation. (#7989) 2022-03-25 15:07: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
胡俊
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
94f894fb80
[develop] add request type field at the head of task data, exchange parse order between Log and GetRequest (#7871)
* add request type field and exchange Log and GetRequest parse order

* add unit test
2022-03-10 09:54:22 +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
onewe
eaa0efd976
[ISSUE#7902] Optimize some codes for ServerLoaderController (#7903)
- some type arguments are replaced with <>
- field injection is replaced with constructor injection
- set hash map default initialCapacity
- sdkConCount string variable change to constants

Close #7902
2022-03-07 19:58:32 +08:00
onewe
8098de7baf
[Optimize] use template patten to refactor AbstractMemberLookup#destroy method (#7880)
- add doDestroy method
- refactor destroy method for other subclass of AbstractMemberLookup
2022-03-04 17:59:51 +08:00
chaos
d83019cf59 删除冗余代码 2022-02-25 10:46:03 +08:00
MajorHe1
1c5cf5ee9a
[ISSUE #7621] Add hasChange judgement in ServerMemberManager to avoid useless nacos-cluster log output (#7622)
* [ISSUE #7621] Add hasChange judgement in ServerMemberManager to avoid useless nacos-cluster log output

* [ISSUE #7621] judge whether Loggers.CLUSTER is debug enabled.
2022-02-21 16:08:55 +08:00
KomachiSion
eeb5268282 auth plugin add enableAuth method to switch auth more precisely. 2022-02-15 14:21:31 +08:00
杨翊 SionYang
64dcc0ed0a
[ISSUE#5696] IdentityContext build from resource and remote ip. (#7745)
* validateIdentity add Resource input for extension.

* IdentityContext parse remoteIp.
2022-02-09 17:57:39 +08:00
Steafan Zhou
ee26380692
Develop issue#7224 (#7318)
* For #4092,Fix the problem.

* For #7224,Fix the problem.

* For #7224,Fix the problem.
2022-02-09 10:50:38 +08:00
KomachiSion
aba0facf90 Move user to nacos-plugin-default-impl module. 2022-01-26 10:05:39 +08:00
KomachiSion
6a4ecc1323 Move default auth impl from console to nacos-plugin-default-impl module. 2022-01-24 17:47:54 +08:00
KomachiSion
32d7ce3b66 Repackage some class 2022-01-24 15:35:45 +08:00
KomachiSion
89cc6caade Add plugin and auth-plugin module, and move class into module. 2022-01-21 15:06:09 +08:00
KomachiSion
be9516d037 Remove AuthManager.java 2022-01-21 13:49:30 +08:00
KomachiSion
e606dd7333 Grpc request use new plugin. 2022-01-20 20:49:49 +08:00
KomachiSion
80a6821bb7 Http request use new plugin. 2022-01-20 17:59:05 +08:00
KomachiSion
88818d0816 Http request use new plugin. 2022-01-20 16:04:20 +08:00
KomachiSion
d2e11a3de7 Add new ProtocolAuthService to replace AuthManager. 2022-01-20 14:22:43 +08:00
KomachiSion
dc1c05d2dc Repackage some auth classes. 2022-01-17 16:32:23 +08:00
KomachiSion
956df153d6 Add resource parser 2022-01-14 16:52:21 +08:00
onewe
0921a17336 [ISSUE #7607] Clean test's files after run the FileKvStorageTest
Close #7607
2022-01-10 16:04:48 +08:00
李晓双 Li Xiao Shuang
25464ff7e8
Merge pull request #7578 from MiracleDx/develop
#7577 fix missing return keyword of request body validated
2022-01-07 16:31:14 +08:00
李晓双 Li Xiao Shuang
bc439a4593
Merge pull request #7559 from MajorHe1/fix_authFilter
[ISSUE #7558] add serverIdentity empty-judgement to avoid useless log…
2022-01-07 16:24:10 +08:00
李晓双 Li Xiao Shuang
5ddb35a129
Merge pull request #7564 from horizonzy/catch-exception-when-register-self
catch exception when register self to cluster.
2022-01-07 16:19:09 +08:00
dongx
0318d46c23 fix missing return keyword of request body validated 2022-01-07 15:44:53 +08:00
horizonzy
d203421a8d modify log level when expcetion occur. 2022-01-07 15:40:19 +08:00
horizonzy
74345bb9c9 catch exception when register self to cluster. 2022-01-06 13:55:47 +08:00
MajorHe1
cab18a206f [ISSUE #7558] add serverIdentity empty-judgement to avoid useless log output 2022-01-05 20:48:18 +08:00
程露
cd469ca1b0
Merge pull request #7507 from li-xiao-shuang/feature_fix_1
Unnecessary 'toString()' call
2021-12-27 16:52:26 +08:00
lixiaoshuang
168b0b4416 Strengthen the code 2021-12-27 14:36:56 +08:00
lixiaoshuang
8bf430ac70 Unnecessary 'toString()' call 2021-12-27 13:05:37 +08:00
YunWZ
f30e69e9d5 Remove meaningless parentheses #7474 2021-12-21 23:53:38 +08:00
onewe
408c77ed68
Typo in word 'accetor' (#7273)
Close #7249
2021-11-24 11:06:26 +08:00
soulerror
921b0072d7
fix a wrong code annotation in com.alibaba.nacos.core.remote.ConnectionMeta (#7223) 2021-11-16 11:16:05 +08:00
onewe
e1487164ff
Ignore the WebServerInitializedEvent if the name space of the spring context is management (#7236)
Close#7230
2021-11-16 11:13:11 +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
杨翊 SionYang
76aeb180d2
Refactor Server ability init login with SPI. (#7174)
* Move ability classes.

* Add ServerAbilityInitializer and RemoteAbilityInitializer

* Add NamingAbilityInitializer.

* Use ServerAbilityInitializer replace old init ability.

* For pmd.
2021-11-04 10:10:11 +08:00
赵延
0677323d59
remove useless grpc code. (#7163) 2021-11-03 10:23:38 +08:00
赵延
4efd0e7a7b
Fix response success (#6987)
* fix Response.success is false logic problem.

* fix Response.success is false logic problem.
2021-09-26 21:17:38 +08:00
brotherlu-xcq
9658d23b07
[ISSUE #6767] optimize the push data logic. (#6773)
* [ISSUE #6767] optimize the push logic.

* [ISSUE #6767] move the service to PushDataWrapper.

* [ISSUE #6767] optimize the ServiceMetadata.

* [ISSUE #6767] format the javadoc.

* [ISSUE #6767] format the javadoc.

* [ISSUE #6767] fix ci issue.

* [ISSUE #6767] fix ci issue.

* [ISSUE #6767] fix ci issue.
2021-09-02 14:54:17 +08:00
赵延
dfb926867a
when read-index read timeout, go to leader to read. (#6575) 2021-08-06 11:08:38 +08:00
ZZQ的
1119d0336f
Replace "ThreadFactoryBuilder" API with jdk API and add unit test (#6532) 2021-08-04 13:56:26 +08:00
ZZQ的
995cd7a3a4
Replace "google.common.reflect.* TypeToken" API with jdk API (#6527)
* Replace "google.common.reflect.* TypeToken" API with jdk API

* update unit test
2021-08-04 13:52:40 +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的
c6c5cd45f1
Replace "google.common.base.Joiner" API with jdk API (#6501) 2021-08-02 10:07:08 +08:00
brotherlu-xcq
8f6bf616d7
[ISSUE #5093] Add unit tests for module nacos-consistency in nacos 2.0. (#6490)
* [ISSUE #5093] add unit test in nacos-consistency.

* fix unit test which cannot pass ci.

* remove the unused import.
2021-07-29 10:48:12 +08:00
杨翊 SionYang
fab5ae5bf8
Upgrade to 2.0.3 (#6488)
* Upgrade to 2.0.3

* Fix Unit test problem.

* Ignore illegal unit test
2021-07-28 19:20:44 +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
wuwen
ab1f543b9f
improvement currentTimeMillis calc, using System.nanoTime() to measure elapsed time. (#6366) 2021-07-26 09:38:33 +08:00
杨翊 SionYang
a5cc7178fc
[ISSUE#6403] the expired time of naming client can be configured. (#6422)
* add AbstractDynamicConfig

* Add ClientConfig

* use ClientConfig to remove expired client.

* For checkstyle

* Update application.properties
2021-07-23 14:03:46 +08:00
wuwen
4d7ccd56b6
improvement performance (#6407) 2021-07-22 10:11:46 +08:00
ZZQ的
12a9bfb3c8
[ISSUE #6314] Remove common-lang3 from pom.xml (#6334) 2021-07-13 09:32:15 +08:00
hunjipo
cdc276e829
To slightly improve performance, this commit switches to StringBuilder.append(char) instead of StringBuilder.append(String) whenever we append a single character to a StringBuilder. (#6300) 2021-07-12 13:51:14 +08:00
brotherlu-xcq
6f826e9a55
[FOR 5094 cluster] add unit tests in nacos-core. (#6316)
* [ISSUE #5904] add ClusterRpcClientProxyTest.

* [nacos-core] [unit test] add unit test for FileConfigMemberLookupTest.
2021-07-12 09:29:31 +08:00
brotherlu-xcq
81e2f43e4b
[FOR 5094 controller] add unit tests in nacos-core. (#6307)
* [nacos-core] [unit test] add unit test for CoreOpsControllerTest, NacosClusterControllerTest.

* [ISSUE #5904] add ServerLoaderControllerTest.
2021-07-08 15:19:52 +08:00
ZZQ的
b9e388bff9
[core module] replace *commons.lang3*.*Utils to com.alibaba.nacos.com… (#6288)
* [core module] replace *commons.lang3*.*Utils to com.alibaba.nacos.common.utils.*Utils

* Use StringUtils replace jdk String method.

* Fix error logic.
2021-07-08 15:13:34 +08:00
brotherlu-xcq
71f170a7a5
[FOR 5094 auth] add unit tests in nacos-core. (#6290)
* [ISSUE #5904] add ParamRequestConditionTest.

* [ISSUE #5904] add AuthConfigTest and AuthFilterTest.

* [ISSUE #5904] add RemoteRequestAuthFilterTest.

* [ISSUE #5904] fix ci problem.

* [ISSUE #5904] add PathRequestConditionTest.
2021-07-07 10:20:14 +08:00
brotherlu-xcq
e2fc2e44a0
[FOR 5094 remote] add unit tests in nacos-core. (#6262)
* [ISSUE #5904] add unit tests for ClientConnectionEventListenerRegistryTest and ConnectionManagerTest.

* [ISSUE #5904] add unit tests for left class.

* [nacos-core] [unit test] change the uuid.

* [ISSUE #5904] fix the wrong assert.
2021-07-06 10:06:55 +08:00
brotherlu-xcq
e8812e5845
[FOR 5094 remote/core] add unit tests in nacos-core. (#6234)
* [ISSUE #5904] add unit test for directory remote/core.

* [ISSUE #5904] remove the all parameter constructor.
2021-07-02 17:47:04 +08:00
ZZQ的
888f50b5e4
Add NumberUtils、NumberUtilsTest;Modify NumberUtil dependency (#6227)
* Add NumberUtils、NumberUtilsTest;Modify NumberUtil dependency

* delete "isNumber" function

* [ISSUE #6221] Canonical code
2021-07-02 17:46:32 +08:00
brotherlu-xcq
89af6a97ae
[FOR 5094 remote/grpc] add unit tests in nacos-core. (#6226)
* [ISSUE #5904] add grpc directory unit tests.

* [ISSUE #5904] add grpc directory unit tests, for GrpcRequestAcceptor.java.

* [ISSUE #5904] fix ci problem.

* [ISSUE #5904] remove the all parameter constructor and add test scope for grpc-testing.
2021-07-02 17:45:45 +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
brotherlu-xcq
041983269c
[FOR 5094 remote/control] add unit tests in nacos-core. (#6157)
* [unit test] [nacos-core remote] add unit tests of MonitorKeyMatcher.

* [unit test] [nacos-core remote/control] add unit tests of TestMonitorPoint and TpsRecorder.

* [unit test] [nacos-core remote/control] fix ci issue.

* [unit test] [nacos-core remote/control] fix ci issue.

* [unit test] [nacos-core remote/control] fix ci issue.

* [nacos-core] [unit test] try to fix MemberUtilTest problem

* [unit test] [nacos-core remote/control] fix not shutdown issue.

* [unit test] [nacos-core remote/control] fix ci issue in LookupFactoryTest.
2021-06-25 14:33:10 +08:00
MajorHe1
fb9668a35e
[ISSUE #6132] RemoteRequestAuthFilter get error message from AccessException correctly (#6133) 2021-06-22 21:11:32 +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
杨翊 SionYang
4a474ce30a
For #6116. Refactor ClientManager and make register client and schedule checkTask is atomic. (#6118) 2021-06-22 09:49:59 +08:00
杨翊 SionYang
0d3bf616e6
[ISSUE#5976] Fail CI directly if UT can't pass. (#6106)
* For #5976. fail CI directly if UT can't pass.

For #5976. fail CI directly if UT can't pass.

For #5976. fail CI directly if UT can't pass.

* For #5976. fail CI directly if UT can't pass.
2021-06-18 17:49:51 +08:00
杨翊 SionYang
7c30acc4dc
[ISSUE#5985] Fix unit test problem for nacos-core. (#6102)
* Fix #5985, Fix unit test problem for nacos-core.

* For checkstyle
2021-06-17 21:05:27 +08:00
杨翊 SionYang
463a29f082
Develop fix ci (#6092)
* Fix github CI

* Add github IT
2021-06-17 15:15:54 +08:00
brotherlu-xcq
2dc35ab9a9
[FOR 5094 monitor] add unit tests in nacos-core. (#6076)
* [nacos-core] [unit test] add unit test in monitor directory.

* [nacos-core] [unit test] rollback unused change
2021-06-16 10:30:33 +08:00
brotherlu-xcq
b23756faaf
[FOR 5094 storage] add unit tests in nacos-core. (#6043)
* [Unit tests] [storage] add unit tests.

* add License
2021-06-15 13:55:52 +08:00
brotherlu-xcq
e74560de1c
[FOR 5094 utils] add unit tests in nacos-core. (#6037)
* [Unit tests] [RemoteUtils] add unit tests.

* [Unit tests] [StringPool] add unit tests.

* [Unit tests] [OverrideParameterRequestWrapper] add unit tests.

* [Unit tests] [WebUtils] add unit tests.

* [Unit tests] [ClassUtils] add unit tests.
2021-06-15 13:55:17 +08:00
虫二
1650850adf
[ISSUE #5999] AddressServerMemberLookup.syncFromAddressUrl适配nacos endpoint (#6001)
* [ISSUE #5999] AddressServerMemberLookup.syncFromAddressUrl适配nacos endpoint

* 添加AddressServerMemberLookup.syncFromAddressUrl方法测试

* 恢复点分隔配置
2021-06-15 13:51:41 +08:00
brotherlu-xcq
c5ff2f7aac
fix the problem by code quality (#6027) 2021-06-09 19:31:03 +08:00
brotherlu-xcq
11b49cc3d6
[code quality] [nacos-core] [remote-grpc/utils] remove unnecessary symbol, export constant in class (#5897) 2021-05-31 10:11:07 +08:00
brotherlu-xcq
4cfa8277cc
[FOR 5877 remote/control] improve the code quality of nacos-core. (#5896)
* [code quality] [nacos-core] [remote-control] remove unnecessary symbol, export constant in class, change the Chinese javadoc to English

* [code quality] [nacos-core] [remote-control] remove unnecessary symbol, export constant in class, change the Chinese javadoc to English
2021-05-31 10:04:53 +08:00
brotherlu-xcq
be37450ba4
[code quality] [nacos-core] [controller/distributed/listner/monitor] remove unnecessary symbol, export constant in class, change the Chinese javadoc to English (#5895) 2021-05-31 10:02:24 +08:00
brotherlu-xcq
cb5500679c
[FOR 5877 auth/cluster] improve the code quality of nacos-core. (#5894)
* [code quality] [nacos-core] [auth/cluster] remove unnecessary symbol, export constant in class, change the Chinese javadoc to English

* [code quality] [nacos-core] [auth/cluster] fix the ci problem
2021-05-31 09:59:55 +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
Pixy Yuan
ebd6322e7e
[ISSUE #5872] Downgrade checker only focus on changing members. (#5873) 2021-05-27 17:44:30 +08:00
KomachiSion
fe1218674a Fix test compile problem 2021-05-14 11:30:51 +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
xiaoheng1
40cb9ecc43
Extract constants in WebUtils (#5677)
* fix #5676 Extract constants in WebUtils

* add empty line separator

* use nacon.common constants.
2021-05-14 09:38:51 +08:00
杨翊 SionYang
d929c2e328
Add monitor about Distro (#5686) 2021-05-12 16:42:37 +08:00
xiaoheng1
c043ad4d08
Optimize the AbstractMemberLookup class, abstract out the template method (#5593)
* fix #5592 Optimize the AbstractMemberLookup class, abstract out the template method

* add exception javadoc
2021-05-10 20:40:55 +08:00
JackSun-Developer
1ec7ffa4b1
[#5577] The AddressServerMemberLookupTest class lacks a lot of Unit Tests. (#5578) 2021-05-10 12:46:06 +08:00
JackSun-Developer
88a0871f80
[#5601] The package com.alibaba.nacos.core.distributed.distro.component lacks Unit Tests. (#5606) 2021-05-10 12:45:40 +08:00
haoyann
6afcb059e0
remove unnecessary return (#5626) 2021-05-10 11:45:41 +08:00
JackSun-Developer
c27292116c
[#5599] The class com.alibaba.nacos.core.distributed.distro.DistroConfig lacks Unit Test. (#5604) 2021-05-10 11:42:07 +08:00
JackSun-Developer
b564256441
[#5596] Package com.alibaba.nacos.core.distributed.distro.task lacks a lot of Unit Tests (#5603) 2021-05-10 11:41:43 +08:00
JackSun-Developer
26c6db005b
[#5595] Package com.alibaba.nacos.core.distributed.distro.entity lacks a lot of Unit tests (#5602) 2021-05-10 11:41:13 +08:00
JackSun-Developer
d31acb5e45
[#5579] The class LookupFactory lacks corresponding Unit Test. (#5580) 2021-05-10 11:09:53 +08:00
Pixy Yuan
d26689a159
[ISSUE #5574] Remove downgraded member version info. (#5575)
* [ISSUE #5574] Remove downgraded member version info.

* [ISSUE #5574] Remove downgraded member `readyToUpgrade` info.
2021-05-10 11:07:30 +08:00
孙继峰
818d37b71c
delete duplicated dependency (#5622) 2021-05-10 10:43:58 +08:00
KomachiSion
de40cdd943 Remove unused codes in ServerMemberManager 2021-04-28 17:50:30 +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
杨翊 SionYang
71a0037f50
Refactor Distro Config as singleton and replace GlobalConfig (#5486)
* Refactor Distro Config as singleton and replace GlobalConfig

* Use configed timeout for distro sync and verify

* Fix IT error.
2021-04-25 16:50:10 +08:00
杨翊 SionYang
267d67190b
Some enhancement for logs and ability. (#5482) 2021-04-25 13:08:24 +08:00
赵延
291a969e7d
fix error log mismatch {}. (#5426) 2021-04-21 09:38:50 +08:00
杨翊 SionYang
afed87ee30
Fix config IT for nacos2 (#5421) 2021-04-20 18:16:30 +08:00
JackSun-Developer
36a4a84474
[#5393] The class core.distributed.raft.JRaftProtocol lacks a lot of Unit Tests. (#5395) 2021-04-19 10:41:37 +08:00
JackSun-Developer
5b770a0306
[#5353] The class core.distributed.raft.JRaftServer lacks a lot of Unit Tests. (#5394) 2021-04-19 09:30:58 +08:00
JackSun-Developer
2b29315889
[#5353] The class core.distributed.raft.JRaftServer lacks a lot of Unit Tests. (#5396) 2021-04-19 09:29:52 +08:00
JackSun-Developer
121750ee33
[#5393] The class core.distributed.raft.JRaftProtocol lacks a lot of Unit Tests. (#5398) 2021-04-19 09:29:02 +08:00
杨翊 SionYang
73eea9c0bb
Use ThreadUtil and EnvUtil replace Runtime.availableProcessor (#5388) 2021-04-16 17:32:14 +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
cutiechi
7a1e78e836
[ISSUE#5253] Fix missing identity header error (#5309)
* Fix missing identity header error

* Format code

* Remove unnecessary change
2021-04-09 10:46:54 +08:00
赵延
d07e89098d
memory optimize. (#5273) 2021-04-08 16:11:55 +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
Gagharv
141e531c52
Just delete unnecessary code, which may cause members to lose state, such as supportRemoteConnection. (#5176)
When the node list is changed, ClusterRpcClientProxy#refresh is judged as a member leave.
2021-03-25 09:46:01 +08:00
赵延
32d8d4be43
remove useless file. (#5142) 2021-03-19 15:45:55 +08:00
赵延
6df6097b63
remove useless file. (#5140) 2021-03-19 11:46:22 +08:00
KomachiSion
d160c84bf3 Solve conflict 2021-03-18 13:42:14 +08:00
KomachiSion
acbdaf012e Solve conflict 2021-03-18 13:41:13 +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
fd57e08897
perfect KvStorage doc (#5112) 2021-03-16 16:54:17 +08:00
nov.lzf
93e47bc6d3
support tpc control in minutes level, support tps control for every ptoro key with matched pattern (#5071) 2021-03-10 22:19:14 +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
KomachiSion
0c35f056b0 DistroDelayTaskProcessor handle ADD type like CHANGE 2021-03-08 18:26:22 +08:00
KomachiSion
b007f302b6 Add some log for distro. 2021-03-08 17:41:48 +08:00
KomachiSion
4aee04603c Add some log for distro. 2021-03-08 15:48:11 +08:00
杨翊 SionYang
eb36581c2c
Refactor and enhance for client distro protocol (#5017)
* Distro check dataStorage status before send verify data.

* Add source server address info for distro verify.

* Refactor Distro verify task.

* Refactor Distro client verify task
2021-03-05 11:45:56 +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
96de2783a1
core add log change (#5002) 2021-03-04 18:45:20 +08:00
MajorHe1
4191286625
[ISSUE #4925] correct the member's state when the cluster information changed (#4948) 2021-03-01 09:06:30 +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
haoyann
fe1d064cf4
raft ops interface add auth (#4919) 2021-02-23 09:32:34 +08:00
nov.lzf
0449fbc707
move server loader controller from console to core; modify common server scheduler count to solve large cpu usage (#4872)
* move server loader controll from  console to core

* modify common server scheduler count to solve large cpu usage
2021-02-04 14:09:08 +08:00
nov.lzf
c272d78890
add client sign header and nacos default port;sync code with diamnd over nacos 2.0 (#4857)
* add client sign header and nacos default port

* sync code with diamnd over nacos 2.0

* pmd and check style
2021-02-02 17:31:01 +08:00
nov.lzf
d5af830d52
remove config resync request and add getting cluster metrics (#4846)
* from diamond over nacos  2.0

* config notify task type bugfix

* keep consistent  with diamond over nacos 2.0

* remove config resync  request and add getting cluster metrics

* add using address server to look up interface

* add using address server to look up interface
2021-02-01 13:33:56 +08:00
KomachiSion
cecf0c0893 Add double write logic for upgrade 2021-01-27 20:33:42 +08:00
nov.lzf
3cfa183400
convert payload type from full name to simple name;abilities both on client-server& server cluster submit (#4791)
* convert payload type from full name  to simple name.

* abilities both on client-server& server cluster submit

* Cas of update config, beta,tag publish

* tenant support on connection.

* modify health check tps point name
2021-01-25 14:11:35 +08:00
nov.lzf
7e58b5cb7b
fuzzy match support of tps control;remove http transport of client worker ; add internal executors of CacheData notifier (#4783)
* keepalive time adjust

* fuzzy match support of tps control;remove http transport of client worker ; add internal executors of CacheData notifier
2021-01-22 18:34:37 +08:00
nov.lzf
c4ffbab21f
connection manager ,active send interval increase (#4776)
* connection manager ,active send interval increase

* adjust sync all interval
2021-01-21 20:47:23 +08:00
nov.lzf
4e7346db1d
tps monitor key use self define submit;active detection both on client and server (#4767)
* tps monitor key use self define submit

* pmd and check style.

* active detection of client and server

* connection manager ,active send interval increase
2021-01-21 14:40:07 +08:00
nov.lzf
91bf227c4a
tps control submit; connection rule (#4752)
* tps reporter submit

* tps reporter submit

* log optimize; listen concurrent bugfix; async request exception fix

* server loader bugfix;increase keep alive default time

* tps report bugfix, tps log bugfix;

* rpc server push ack notify bugfix.

* change rule store dir ;add local file change event of connection rule.

* remove client side request meta; reduce client parameters

* 简化冗余代码

* 优化异常日志

* md5 sync bugfix

* client metrics submit; tps monitor ip list support

* client metrics submit; tps monitor ip list support
2021-01-20 09:21:40 +08:00
杨翊 SionYang
a44bf67402
Add Http and MySQL health check. (#4750)
* Add Http health check.

* Add Tcp as ClusterMetadata default checker

* Fix console can update cluster metadata if port no change

* Add MySQL health check.
2021-01-19 19:30:02 +08:00
KomachiSion
fd06b5a7b6 Merge remote-tracking branch 'upstream/develop' into feature_support_grpc_core
# Conflicts:
#	address/pom.xml
#	api/pom.xml
#	auth/pom.xml
#	client/pom.xml
#	cmdb/pom.xml
#	common/pom.xml
#	config/pom.xml
#	consistency/pom.xml
#	console/pom.xml
#	core/pom.xml
#	distribution/pom.xml
#	example/pom.xml
#	istio/pom.xml
#	naming/pom.xml
#	pom.xml
#	sys/pom.xml
#	test/pom.xml
2021-01-18 10:32:57 +08:00
杨翊 SionYang
1bd67269cd
Use revision to set version and upgrade to 1.4.2-SNAPSHOT (#4711)
* Use revision set version

* Use revision set version

* Add flatten plugin
2021-01-15 14:37:47 +08:00
KomachiSion
619dd68377 Revert interceptor all ui problem 2021-01-15 10:31:12 +08:00
杨翊 SionYang
d568030823 Fix #4701 (#4703)
(cherry picked from commit 2cc0be6ae1)
2021-01-14 21:14:45 +08:00
杨翊 SionYang
2cc0be6ae1
Fix #4701 (#4703) 2021-01-14 21:02:28 +08:00
杨翊 SionYang
67eb36976e
Upgrade to 1.4.1 (#4695) 2021-01-14 11:36:57 +08:00
KomachiSion
902f501fac Merge remote-tracking branch 'upstream/develop' into feature_support_grpc_core
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java
#	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
#	config/src/main/java/com/alibaba/nacos/config/server/service/notify/AsyncNotifyService.java
#	naming/src/main/java/com/alibaba/nacos/naming/push/ClientInfo.java
#	naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java
2021-01-13 15:53:50 +08:00
KomachiSion
591350e5f6 For checkstyle 2021-01-13 14:46:03 +08:00
liaochuntao
2eac367970 fix: fix Jraft WriteRequest type problem. 2021-01-13 14:39:00 +08:00
杨翊 SionYang
998947315e
Add server identity to replace user-agent white list. (#4683) 2021-01-13 14:12:56 +08:00
nov.lzf
6027d36222
client use same executor during different connection;metrics count bugfix.;recommend server check (#4659)
* client use same executor during different connection.

* metrics count bugfix.

* recommend server check

* remove rsocket ;add client metrics

* add client metrics to get cache value

* rpc tps control basic api submit.

* check style ,pmd fix.
2021-01-11 14:11:32 +08:00
nov.lzf
2d8d4c5f5a
onnectionLimitRule submit.client use same executor during different … (#4651)
* ConnectionLimitRule submit.

* ConnectionLimitRule submit.client use same executor during different connection.
2021-01-08 09:59:03 +08:00
KomachiSion
11210c057d Merge remote-tracking branch 'upstream/develop' into 2.0.0-sync-dev 2021-01-07 17:09:30 +08:00
liaochuntao
24d0cbaa52
Merge pull request #4645 from KomachiSion/develop-issue#4291
For #4291, support remove old raft metadata
2021-01-07 14:29:40 +08:00
liaochuntao
30ab49b1f6
fix: fix jraft response instance (#4644) 2021-01-07 13:52:41 +08:00
KomachiSion
5e0adf7d53 For #4291, support remove old raft metadata 2021-01-07 13:36:36 +08:00
nov.lzf
afb1a28135
log optimize; config re sync request (#4638) 2021-01-06 21:25:14 +08:00
KomachiSion
7f3a17c620 Solve conflict with develop branch. 2020-12-31 14:24:41 +08:00
KomachiSion
bdacd0958d Merge remote-tracking branch 'upstream/develop' into 2.0.0-sync-develop
# Conflicts:
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java
#	client/src/main/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxy.java
#	core/src/main/java/com/alibaba/nacos/core/listener/StartingApplicationListener.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/ServiceController.java
2020-12-31 11:48:52 +08:00
杨翊 SionYang
9b9d1cb565
Execute Distro transport asynchronously. (#4595) 2020-12-29 18:09:20 +08:00
nov.lzf
0ad5bcbb17
call back bugfix. rpc executor extract... (#4592) 2020-12-29 16:23:32 +08:00