Commit Graph

1045 Commits

Author SHA1 Message Date
杨翊 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
brotherlu-xcq
8077ce02a4
[ISSUE #5520] Add unit tests for package com.alibaba.nacos.naming.core.v2.cleaner in nacos2.0. (#6401)
* [ISSUE #5520] add unit test for EmptyServiceAutoCleaner.

* [ISSUE #5520] add unit test for EmptyServiceAutoCleanerV2.
2021-07-22 10:15:21 +08:00
brotherlu-xcq
a64f5b592b
[ISSUE #5519] Add unit tests to package com.alibaba.nacos.naming.controllers in nacos 2.0. (#6414)
* [ISSUE #5519] complete CatalogControllerTest.

* [ISSUE #5519] add unit test in controllers, not include deprecated method.

* [ISSUE #5519] fix ci issue.
2021-07-22 09:58:12 +08:00
brotherlu-xcq
784cc82d9e
[ISSUE #6365] Implement the built-in Selector in Nacos 1.x and add unit test. (#6383)
* [ISSUE #6301] implement the CmdbSelectorContextBuilder and move the 1.x LabelSelector logic to CmdbLabelSelector and add unit test.

* [ISSUE #6301] remove the unused method.

* [ISSUE #6301] fix ci issue.
2021-07-20 10:33:58 +08:00
Pixy Yuan
22393e4456
[ISSUE #6386] Stop v1 distro verification when cluster upgraded to v2. (#6387) 2021-07-19 16:42:34 +08:00
brotherlu-xcq
bb987d05f5
[ISSUE #6356] Define the Selector workflow and add unit test. (#6357)
* [ISSUE #6301] Define the workflow of Selector.

* [ISSUE #6301] Add unit test for SelectorManager.

* [ISSUE #6301] fix ci issue.

* [ISSUE #6301] test Selector with serial.

* [ISSUE #6301] fix javadoc.
2021-07-16 11:31:33 +08:00
杨翊 SionYang
44a1d02922
Fix instance metadata will not be removed for ip port client. (#6332) 2021-07-12 14: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
孙继峰
f326a0c543
[ISSUE #5095] Add unit test for ClassUtils (#6327)
* fix typo

* add unit test for ClassUtils
2021-07-12 09:45:35 +08:00
ZZQ的
98e1e72ed9
[issue #6284][naming module] replace *commons.lang3*.*Utils to com.al… (#6291)
* [issue #6284][naming module] replace *commons.lang3*.*Utils to com.alibaba.nacos.common.utils.*Utils

* add StringUtils.split() function

* Replace NumberUtils.isNumber()  -> NumberUtils.isDigits()
2021-07-12 09:16:57 +08:00
杨翊 SionYang
5e545c8d37
[ISSUE#6272] Refactor Instance builder to build and handler request from http. (#6298)
* Add InstanceBuilder and IdGenerator

* Add new builder for http request and client beat

* Use new builder to build api instance.

* Modified according review comment.
2021-07-07 17:01:40 +08:00
shalk(xiao kun)
c973566db9
[ISSUE #6188]add ut for com.alibaba.nacos.naming.cluster (#6279)
* add ut for  com.alibaba.nacos.naming.cluster

* fix ut
2021-07-07 10:02:01 +08:00
杨翊 SionYang
5c375afe81
Add SPI for ClientBeatExtensionHandler (#6250) 2021-07-02 17:17:24 +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
杨翊 SionYang
eb2644fd37
Add SPI for upgrade checker. (#6217)
* Add SPI for upgrade checker.

* For checkstyle
2021-07-01 11:20:41 +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
Pixy Yuan
ea803a85ae
[ISSUE #6109] Using configuration to register upgrade helpers as conditional beans. (#6115) 2021-06-22 14:07:57 +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
463a29f082
Develop fix ci (#6092)
* Fix github CI

* Add github IT
2021-06-17 15:15:54 +08:00
zhox
1b18f2c3ca
[code quality][nacos-address]improve the code of ServiceManager.java (#5919)
* [code quality][nacos-address]improve the code of ServiceManager.java

* remove unused import

* 1 fix with ServiceManager.java

* 1 fix with ServiceManager.java
2021-06-16 10:24:36 +08:00
杨翊 SionYang
6ca9c25a68
Fix Unit test in nacos naming module (#6031) 2021-06-15 14:00:17 +08:00
李晓双 Li Xiao Shuang
43f4d5d927
improve the code quality for naming (#6008) 2021-06-09 10:05:23 +08:00
Cherish 蔡
c025dc2c18
Feat resource parser group (#5889)
* feat(#5888): ResourceParser groupName change the splicing method.

* feat(#5888): add UT for NamingResourceParser and ConfigResourceParser
2021-06-09 09:48:18 +08:00
杨翊 SionYang
ae39b9502a
[ISSUE#5921] Adapt some Naming API after upgrading to v2.x. (#5972)
* Fix #5921, Adapt some Naming API after upgrading to v2.x.

* Fix pmd
2021-06-07 16:37:01 +08:00
李晓双 Li Xiao Shuang
90cb967763
improve the code quality for naming misc (#5944) 2021-06-07 14:30:24 +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
7a7f267ee9
improve the code quality for naming healthcheck (#5932) 2021-06-03 11:31:39 +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
Pixy Yuan
07f38a4763
[ISSUE #5927] Init health check status when loading snapshot of persistent instances. (#5928) 2021-06-03 09:35:01 +08:00
杨翊 SionYang
09c7293085
Stop do sync when sync is no need. (#5882) 2021-05-28 14:08:25 +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
tianqingzhao
3b3de662c5
Optimize code that all checks for empty service. (#5869)
* Optimize code that all checks for empty service.

* Add Agreement License.
2021-05-27 18:10:55 +08:00
Pixy Yuan
ebd6322e7e
[ISSUE #5872] Downgrade checker only focus on changing members. (#5873) 2021-05-27 17:44:30 +08:00
Pixy Yuan
34ed52192a
[ISSUE #5870] Prevent instance ephemeral value used by DoubleWrite. (#5871)
* Fix client beat task skip interceptors unexpectedly

* Refactor transform instance and service/cluster between v1/v2 model.

* [ISSUE #5870] Prevent instance ephemeral value used by DoubleWrite.
2021-05-27 17:41:38 +08:00
tianqingzhao
a233563e82
Optimize code that checks for empty service. (#5840) 2021-05-26 10:07:19 +08:00
tianqingzhao
5e40b78500
Remove any extra curly brace suffixes from the log (#5810) 2021-05-24 14:03:05 +08:00
Pixy Yuan
5c7730737a
[ISSUE #5798] Fix upgraded server cannot downgrade and upgrade again. (#5800)
* [ISSUE #5798] Fix upgraded server cannot downgrade and upgrade again.

* Fix NPE when delete ServiceMetadata of an non-exist service.
2021-05-21 11:06:49 +08:00
Pixy Yuan
93fd771271
[ISSUE #5782] Fix removal of instances when DoubleWrite removing service. (#5793) 2021-05-20 11:12:03 +08:00
Pixy Yuan
c858139329
[ISSUE #5775] Persist the cluster upgrade states to disk. (#5792) 2021-05-20 11:11:07 +08:00
李晓双 Li Xiao Shuang
35c8035861
[ISSUE #5774] improve the code quality for controllers (#5784)
* improve the code quality for controllers

* improve the code quality for controllers
2021-05-20 11:05:54 +08:00
李晓双 Li Xiao Shuang
022fb6ac68
improve the code quality for consistency (#5783) 2021-05-20 11:04:56 +08:00
李晓双 Li Xiao Shuang
08db47ce84
magic number (#5781) 2021-05-20 09:51:52 +08:00
FlyingLambrog
5e80d12932
Add unit tests for class naming.core.ClusterOperatorV2Impl (#5763) 2021-05-18 19:52:47 +08:00
Pixy Yuan
4655dded44
[ISSUE #5767] Cleanup data of v1 after disable DoubleWrite. (#5772) 2021-05-18 19:48:07 +08:00
Pixy Yuan
160ed5b360
[ISSUE #5756] Support to specify ephemeral value for createService (#5757)
* [ISSUE #5756] Support to specify ephemeral value for `UpgradeOpsController.createService` .

* [ISSUE #5756] Fix PathVariable is not supported by DistroFilter.
2021-05-17 20:19:43 +08:00
haoyann
536da8214c
remove duplicate client expire check (#5751) 2021-05-17 10:10:54 +08:00
FlyingLambrog
5cb3b6db20
Add unit tests for package com.alibaba.nacos.naming.core.v2.cleaner (#5750) 2021-05-17 10:08:54 +08:00
xiaoheng1
2783167bd3
fix #5724 Extract constants in JacksonSerializer (#5725) 2021-05-17 09:48:46 +08:00
Pixy Yuan
2b076faa63
[ISSUE #5718] Add some APIs for upgrade ops. (#5719)
* [ISSUE #5718] Add some APIs for upgrade ops.

* [ISSUE #5718] Optimize textual field output of metrics API.
2021-05-17 09:47:03 +08:00