Commit Graph

549 Commits

Author SHA1 Message Date
Weizhan Yun
506bc26f4d
[ISSUE #9393] 设置线程为守护线程,保证在main线程推出时应用程序能过正常关闭。 (#9396)
* 设置线程为守护线程,保证在main线程退出时应用程序能过正常关闭。

* graceful shutdown naming executetask engine.
2022-11-03 13:44:00 +08:00
杨翊 SionYang
0293af3329
Remove upd and beat codes in nacos-client. (#9394) 2022-10-25 17:22:47 +08:00
KomachiSion
696d489423 Merge remote-tracking branch 'upstream/2.2.0' into 2.2.0-summer#8312
# Conflicts:
#	plugin/pom.xml
2022-10-24 15:37:47 +08:00
陈浩 Nineteen
308d772a9a
feat/support Batch DeRegister (#9330)
* support Batch DeRegister

* Adjust the de registration method

* use batchRegisterService
2022-10-24 10:01:06 +08:00
杨翊 SionYang
7a23c56822
[ISSUE#7930] 2.2.0 remove some deprecated codes (#9368)
* Remove double write switch and upgrade from 1.X switch.

* Remove IFilterConfig.java

* Remove some deprecated constants and methods

* Remove some deprecated classes in nacos-core

* Remove some deprecated config

* Remove some deprecated codes in naming module

* Remove some deprecated codes in sys module

* Fix unit test

* Try to make UdpConnectorTest pass more easier.
2022-10-21 17:44:26 +08:00
KomachiSion
aa6816b69f Merge remote-tracking branch 'upstream/2.2.0' into summer2022_issue#8308
# Conflicts:
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/InstanceControllerV2.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/ServiceControllerV2.java
#	naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java
2022-10-21 14:16:18 +08:00
杨翊 SionYang
0bfd75252b
Add switch for naming async query. (#9325) 2022-10-14 14:01:01 +08:00
Karson
5396858cbc
修复Grpc反序列化不完整 (#9252) 2022-10-01 19:00:20 +08:00
Daydreamer-ia
677c50e2f6 Notify server ability by ServerRequest. 2022-09-20 16:22:15 +08:00
Daydreamer-ia
5ec1d1f8b5 Change the format of ability table key to string, less time for format conversion when saving. 2022-09-20 15:24:46 +08:00
DongYafei
9439250e80
[ISSUE#8308] update InstanceControllerV2 for api 2.0 (#9111)
* update InstanceControllerV2 for api 2.0

* for InstanceControllerV2, add parameter groupName for api 2.0
2022-09-15 10:47:07 +08:00
Daydreamer-ia
4cff58da13 Add capability table to RequestMeta. 2022-09-10 21:32:42 +08:00
Daydreamer-ia
c97aca3923 Remove unused code 2022-09-10 20:31:14 +08:00
Daydreamer-ia
12e447e690 Add the connection arg to ServerRequestHandler in order to get ability easily. 2022-09-10 14:46:30 +08:00
Daydreamer-ia
02bd4872ca Change the way to transport ability table. 2022-09-09 18:41:04 +08:00
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
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
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
DongYafei
f9824c8acb
fix NacosApiException (#9059) 2022-09-01 10:06:43 +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
679b0e0184 Example for new ability. 2022-08-28 18:48:48 +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
613335e763 Add the junit test for AbilityControlManager. 2022-08-28 17:42:45 +08:00
Daydreamer-ia
a15ef8eb3a Add the base interface and entity for ability control. 2022-08-28 17:35:39 +08:00
DongYafei
429d2bb5ee
for #8308, add namespace api v2.0 (#9012)
* Add NamespaceControllerV2 and UT

* add api [query namespace by namespaceId]
2022-08-26 09:51:58 +08:00
DongYafei
0df376afd5
for issue#8308, add config and config history api v2.0 (#8953)
* Add ConfigV2Controller and HistoryV2Controller

* fix ConfigControllerV2 and HistoryControllerV2

* fix ConfigControllerV2Test and HistoryControllerV2Test

* add ConfigService and HistoryService

* fix HistoryControllerV2 and HistoryControllerV2Test

* rename ConfigService to ConfigOperationService
2022-08-22 09:37:40 +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
chenhao26
b52fc22d37
batch register add some unit tests (#8702)
* add some junit for batch register

* code syle
2022-07-08 11:53:58 +08:00
chenhao26
073f9e09ed
[ISSUE#5863]add nacos client batchRegitserInstance request (#8675)
* add nacos client batchRegitserInstance request

* adjustment code

* fix word and do not remove indent
2022-07-07 10:56:22 +08:00
ZhangShenao
da34fbd411
Fix word spelling (#8678)
* Fix Word Spelling 'Naocs' in Comment

* Fix Word Spelling in Comment and Log of `ServiceInfo`
2022-07-05 17:43:36 +08:00
ZhangShenao
16059537a8
Fix Class Comment of ConfigPublishResponse and ConfigRemoveResponse (#8672) 2022-07-04 15:28:07 +08:00
liqipeng
ff7bebac53
[ISSUE #8345] Check cluster name in client when registerInstance (#8618)
* Check cluster name in client when registerInstance

* Use `Pattern.compile` to check number to avoid performance lost.
2022-07-01 11:07:55 +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
ZhangShenao
10eacb7808
Fix Word Spelling 'Naocs' in Comment (#8646) 2022-07-01 00:24:09 +08:00
Cherish 蔡梦缘
9d9a26ace3
feat(#8472): [Dependency Governance] Remove useless netty. (#8472) (#8474) 2022-06-06 11:24:33 +08:00
chenhao26
d8238de5e0
[ISSUE#5863] Define InstanceRequest InstanceResponse and Handler (#8489)
* define InstanceRequest InstanceResponse and Handler

* check style
2022-06-01 14:41:08 +08:00
david6969xin
9d3d23c185
[ISSUE#8485] replace the type specification in this constructor call with the diamond operator("<>") (api module) (#8486) 2022-05-31 23:26:58 +08:00
bangbang2333
0a74419c50
[TMFB-4547]nacos没有对clusterName进行校验。出现实例成功注册,但实例查不出来的情况 (#8371) 2022-05-18 10:57:06 +08:00
david6969xin
eb57028ba6
[ISSUE#8358] make this anonymous inner class a lambda (#8365) 2022-05-13 11:32:21 +08:00
Oliver
409d393f13
fix: update comment (#8340) 2022-05-11 11:19:56 +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
lmw
c51b405565 [#8035] Missing serialVersionUID when class implements Serializable interface 2022-03-30 20:34:28 +08:00
lmw
47a9064eec [#8035] Missing serialVersionUID when class implements Serializable interface 2022-03-30 20:30:13 +08:00
胡俊
b4758788b2
Merge pull request #8005 from Oliverwqcwrw/develop-update-UT
[ISSUE #8004]update unit test to fix expected value and actual value is inverse
2022-03-26 22:59:37 +08:00
wangqiang32
a47f936730 checkstyle 2022-03-26 22:14:44 +08:00
wangqiang32
f9f0f58019 update unit test 2022-03-26 22:10:43 +08:00
wangqiang32
e8cde09036 remove unused import 2022-03-25 21:56:49 +08:00
ruansheng
13032a253c
fix field NotSerializableException (#7922) 2022-03-14 09:52:54 +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
胡俊
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
胡俊
e3d239e9b9
Payload registry test (#7885)
* add ConfigPublishGroupKeyParserTest

* PayloadRegistryTest
2022-03-04 16:21:52 +08:00
chenhao26
1caba326e9
删除PayloadRegistry register方法中无效的逻辑判断 (#7839) 2022-02-25 14:11:00 +08:00
胡俊
4c45a3afd3
fix by zero error (#7724)
* fix by zero error

* fix by zero error --unit test
2022-02-07 10:38:37 +08:00
胡俊
cdd83e2117
optimize NotifySubscriberRequest (#7545) 2022-01-07 18:08:22 +08:00
lixiaoshuang
168b0b4416 Strengthen the code 2021-12-27 14:36:56 +08:00
lpaz010
0ecb6e831a
[ISSUE #7163] remove useless service declaration "RequestStream" in grpc proto file (#7193) (#7197) 2021-11-16 13:07:36 +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
李晓双 Li Xiao Shuang
cc213884ff
fix type (#7132) 2021-10-28 10:12:27 +08:00
brotherlu-xcq
9670627724
[FOR #6301] [TASK 1] Integrate this workflow to Nacos 2.0, replace the Selector in 1.x. (#6680)
* [ISSUE #6301] replace the Selector in 1.x.

* [ISSUE #6301] remove the annotation of API(get all selector types).
2021-08-18 10:00:54 +08:00
ZZQ的
ea864c8c5a
Remove pom dependency (#6561) 2021-08-05 09:35:49 +08:00
brotherlu-xcq
47d3afd0e4
[ISSUE #6487] [nacos-api] export the constant in the directory remote. (#6541)
* [ISSUE #6487] [nacos-api] export the constant in the directory remote.

* [ISSUE #6487] [nacos-api] export the constant in the directory exception.
2021-08-05 09:30:34 +08:00
brotherlu-xcq
831bea12b1
[ISSUE #6487] [nacos-api] export the constant in the directory naming. (#6540) 2021-08-04 14:07:28 +08:00
brotherlu-xcq
c19f8400ca
[ISSUE #6487] exprot the constant in directory config. (#6528) 2021-08-03 09:42:11 +08:00
ZZQ的
a0208cd3cb
Replace "google.common.base.Objects" API with jdk API (#6463)
* Replace "google.common.base.Objects" API with jdk API

* use java.utils.Objects.hash()
2021-07-29 10:47: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
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
Jacob Bao
10ef182ca7
[ISSUE alibaba#6160] Optimization of IP address acquisition method (#6320)
* [ISSUE alibaba#6160] Optimization of IP address acquisition method

* add test case and fix bug

* perform the cleanup operation after the method
2021-07-14 09:54:35 +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
nov.lzf
a9e7b15760
clear future on callback timeout (#6141)
* concurrent sync flag fix

* fix check style

* clear future on callback timeout bugfix

* clear future on callback timeout bugfix

* clear future on callback timeout bugfix
2021-06-23 16:39:20 +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
brotherlu-xcq
85b1ea487d
[code quality] [nacos-api] [config] the constants export (#5921) 2021-06-03 09:54:08 +08:00
brotherlu-xcq
024a7a5a53
[code quality] [nacos-naming] [config] the constants export, unused code remove. (#5922) 2021-06-03 09:53:08 +08:00
brotherlu-xcq
6d8ee1bdba
[code quality] [nacos-api] [remote/utils] the constants export, unused code remove. (#5923) 2021-06-03 09:50:21 +08:00
mai.jh
2731f683a6
Comment typos correction. (#5768) 2021-05-19 09:17:10 +08:00
plusmancn
0cf05943c6
feat: support of specifying NAMING_CACHE_REGISTRY_DIR property (Nacos V2) (#5758) 2021-05-17 20:21:05 +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
plusmancn
7e57b90160
[ISSUE #3548] The srcUser fills with username when auth is disabled (console case) (#5566)
* feat: srcUser fills with username (console case)

* fix: code sytle of Constants.java

* fix: code style of the remaining files

* fix: the back button of HistoryDetail.js won't work

* fix: change '源 IP' to '来源 IP'

* fix: undo changes of goList
2021-05-10 20:41:35 +08:00
孙继峰
818d37b71c
delete duplicated dependency (#5622) 2021-05-10 10:43:58 +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
Robert LU
f336283a18
[ISSUE #5367]SPI IConfigFilter (#5474) 2021-04-26 15:49:25 +08:00
杨翊 SionYang
267d67190b
Some enhancement for logs and ability. (#5482) 2021-04-25 13:08:24 +08:00
xiaoheng1
b1e78b6f6d
Optimize the ConfigType.isValidType method (#5434)
* fix #5432 Optimize the ConfigType.isValidType method

* code format
2021-04-23 09:48:45 +08:00
张志勇
103e671d90
Support specified naming UDP push port for client (#5439)
* Nacos client within docker container could not receive service changes via udp

* change code style
2021-04-22 15:10:04 +08:00
Robert LU
df681900f0
[ISSUE #5367]SPI IConfigFilter (#5369)
Co-authored-by: lidaoyang <lidaoyang@hotmail.com>

Co-authored-by: lidaoyang <lidaoyang@hotmail.com>
2021-04-20 19:14:48 +08:00
Ryan Cheung
9cd025a114
[#5308]word spell error in comments (#5313)
* fix the spelling error

* fix the spelling error
2021-04-14 11:00:59 +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
Wu Zhiguo
9bcb901174
Fix some typo (#5260)
* fix some typo

* rollback some comment format
2021-04-03 12:57:57 +08:00
赵延
1ec21de8f4
groupName can't be empty. (#5196) 2021-03-26 09:54: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
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
Pixy Yuan
5c8559b8ba
[ISSUE #5054] Support naming instance list with healthy protection using service.protectionThreshold. (#5055)
* [ISSUE #5054] Support naming instance list with healthy protection using service.protectionThreshold.

* [ISSUE #5054] Fix code formatting.
2021-03-09 11:11:40 +08:00