Commit Graph

2868 Commits

Author SHA1 Message Date
赵延
5776775325
fix com.alibaba.nacos.naming.core.ServiceManagerTest#testUpdateIpAddressesNoInstance unit test can't pass (#4069) 2020-10-28 14:00:55 +08:00
Geertjan Wielenga
adf07eb935
Create maven.yml (#4076) 2020-10-28 10:44:18 +08:00
赵延
bdbb3de62e
[ISSUE-#4056] Ignore load data from remote when standalone mode (#4061)
* ignore load data from remote when standalone mode

* refactor. move standalone mode check from DistroLoadDataTask to DistroProtocol

* rename variable loadCompleted to isInitialized
2020-10-26 19:58:07 +08:00
杨翊 SionYang
6eeeb76473
Develop fix jraft null datum (#4048)
* Fix old raft sync null datum problem

* Fix TimerContext NPE problem
2020-10-22 15:40:00 +08:00
杨翊 SionYang
9ecc17ec17
Merge pull request #4034 from alibaba/jraft_naming_fix_commit_log
Merge jraft naming to develop branch
2020-10-21 15:43:34 +08:00
KomachiSion
fc33fb211c Fix integration test error 2020-10-21 13:49:16 +08:00
KomachiSion
7ad96444c8 Fix unit test error in ci 2020-10-21 10:42:50 +08:00
KomachiSion
cf607a47cd For checkStyle 2020-10-21 09:45:14 +08:00
KomachiSion
5d068a96c7 Merge branch 'jraft_naming' into jraft_naming_fix_commit_log
# Conflicts:
#	console/src/main/resources/static/js/main.js
2020-10-21 09:24:53 +08:00
wangpin
acc865d441
Modify the startup script custom configuration first default configuration (#4021) 2020-10-20 20:11:50 +08:00
杨翊 SionYang
4ee7626bd9
Merge pull request #4024 from alibaba/revert-4023-jraft_naming
Revert "Naming module Raft protocol migration"
2020-10-20 14:33:01 +08:00
杨翊 SionYang
525f981344
Revert "Naming module Raft protocol migration" 2020-10-20 14:32:42 +08:00
杨翊 SionYang
b246668e7d
Merge pull request #4023 from chuntaojun/jraft_naming
Naming module Raft protocol migration
2020-10-20 14:25:13 +08:00
chuntaojun
13f65ed101 Merge branch 'jraft_naming' of https://github.com/chuntaojun/nacos into jraft_naming 2020-10-20 14:22:24 +08:00
chuntaojun
fd3ab9d91d Merge branch 'jraft_naming' of https://github.com/alibaba/nacos into jraft_naming 2020-10-20 14:21:44 +08:00
赵延
1898ddc36d
[ISSUE #3904] feature - operate instance's metadata alonely (#3912)
* feature. add update and delete operation on instance's metadata 90%

* 1.add unit test
2.fix-locateInstance error

* format code style

* add @link on class

* move metadata operate to InstanceController.

* format code 50%

* complete bacth operation of metadata

* remove unnecessary test unit

* modify the variable name

* perfect log info

* modify consumer's dto to match it's description

* 1.rename class OperationContext -> InstanceOperationContext
2.move Map operation from NamingUtils to MapUtils

* check datum is null

* code refactor.

* 1. code refactor
2. modify the batch operate http param. just support (1 services : n instance)

* 1.set default clusterName if instance not set
2.fix client params not set instances bug

* npe fix

* 1.remove consistencyType *, just support ephemeral or persist.
2.remove moditfy property method in InstanceOperationContext and InstanceOperationInfo, it just defined by constructor.

* add instance controller test

* fix code too length

* update the param name

* add feature's version of start
2020-10-19 16:32:02 +08:00
leo
4c2d56cc2b
For #3710#, Fix special characters cannot be used in Metadata (#4019) 2020-10-19 16:31:31 +08:00
jiang
6df2b229d0
[ISSUE-#3855] Provided a feature to view version comparisons in the configDetails page (#3988)
* add detail previous config history api

* modify the previous config history url

* modify log description

* 详情页面添加“历史对比”按钮,点击可打开对比面板

* 点击“历史对比”按钮,获取上一版本数据

* 在查看历史对比的时候 不显示revert按钮

* append doc info

* Add unit tests for ISSUE#3855

* Add the previous updates to main.js and main.css

Co-authored-by: 赵延 <1060026287@qq.com>
2020-10-19 09:29:59 +08:00
杨翊 SionYang
d78ebbbce1
Refactor dispatch task execute (#3995)
* Refactor nacos task execute engine

* Refactor nacos task execute engine

* For checkstyle

* For checkstyle

* Use ThreadUtils to reduce duplicate codes

* Set custom logger for TaskExecuteWorker

* Set custom logger for TaskExecuteWorker
2020-10-16 14:32:39 +08:00
杨翊 SionYang
164ad3a8b9
Revert "for #3621 (#3668)" (#3999)
This reverts commit 29ba11eb to fix #3992
2020-10-16 11:19:52 +08:00
chuntaojun
fbeab52dfd Merge branch 'jraft_naming' of https://github.com/chuntaojun/nacos into jraft_naming 2020-10-15 23:52:00 +08:00
chuntaojun
f60402cfda merge 2020-10-15 23:51:38 +08:00
liaochuntao
8a54b1fc4c
Naming module Raft protocol migration (#3989)
* fix-#3595, delete the unnecessary code (#3596)

* [ISSUE #3566] move the permission code of nacos-core module to nacos-auth module (#3593)

* move the permission code of nacos-core module to nacos-auth module.

* Fix some code style issues

* address server module auth package name change.

* test change

* Incorrect package name correction

* [ISSUE #3592] Fix incorrect prompt when accessing the restricted namespace (#3603)

* Fix incorrect prompt when accessing the restricted namespace

* Modify variable name

* [ISSUE #3600] Replace the deprecated api of jwt (#3616)

* replace the deprecated api of jwt

* transfer secretKey to byte array just using String encode with utf-8

* [ISSUE #3613]  Fix `unit test method not be static` & update publish config listener  in `ConfigTest.java` (#3614)

* fix `unit test method not be static` & update publish config listener in `ConfigTest.java`

* fix `unit test method not be static` & update publish config listener in `ConfigTest.java`

* move jwt dependency from console,core to auth. (#3624)

* refactor: unified implementation of http client api adjustment. (#3639)

* [ISSUE #3628] set naming client updateTask interval more flexible (#3637)

* 1.use server cacheMillis event service deleted
2.naming client UpdateTask's interval will inc by failCount that connect with server

* 1.move failCount to updateTask
2.redefine the updateService method name. updateServiceNow -> updateService, wrap updateService in updateServiceNow when first getServiceInfo

* 1.create push client even service is not exist
2.serviceInfo's hosts is empty or can't connect to server both add the updateTsk interval

* format the indent

* fix: create kvstorage

* refactor: create kv storage]

* refactor: refactor rocksdb storage code

* Fix issue 3661 (#3662)

* improvement: merge upstream/develop

* feat: merge upstream develop

* fix: fix issue #3661

* [ISSUE#3658] refactor TaskManager and move to nacos-common module (#3663)

* Add TaskManagerTest

* Move Abstract Task and Task processor to nacos-common

* Add Nacos execute engine interface and nacos task interface

* Refactor Task Manager to NacosDelayTaskExecuteEngine

* for code style

* [ISSUE #3671] move some tools class into common package (#3672)

* for #3621 (#3668)

* [ISSUE#3315]Nacos client support https (#3654)

* [ISSUE #3315] nacos client support https
* common module add tls related classes
* JdkHttpClientRequest support https
* unified IpUtils

* [ISSUE #3315] nacos client support https
* common module add tls related classes
* JdkHttpClientRequest support https
* unified IpUtils

* [ISSUE #3315] nacos client support https

* format code

* fix typo and doc format of README file (#3688)

1. It’s a little weird to use Chinese comma in English
2. Fix typo:   change 'reposity' to  'repository', 'instance' to 'instances'
3. Format other details of the doc

* Try to fix nacos server CLOSE_WAIT (#3703)

* Fix revert chunk isn't work in Content Comparison page (#3686)

* fix: fixed cluster node version issue

* Fix Logging in with the wrong username or password will cause jackson serialization results to fail (#3695) (#3721)

* [ISSUE#3712] add apache http client factory (#3716)

* refactor: Add apache http client Factory.

* refactor: Add apache http client Factory.

* add license

* refactor: class name change

* [Issue#3692] Use new distro task engine replace old task dispatcher. (#3715)

* Add ServiceManagerTest

* Add DistroConsistencyServiceImplTest

* Add new distro entities

* Add new distro sync data change

* add new VerifyTask to do checksum.

* Replace old sync task and checksum task

* Add retry sync change task.

* Fix high cpu load

* For checkstyle

* Combine naming sync task to reduce http cost

* Move some classes

* Refactor keys combined logic

* enhance package construct

* Fix unit test

* For pmd

* [Issue #3692] Use new distro implmentation to handle sync datum and checksum request (#3734)

* Add receive data and verify data distro protocol interface

* Use new distro implmentation to handle sync datum and checksum request

* Use new distro implmentation to handle get datum request.

* refactor: adjust the data loading logic when a new protocol is started

* [ISSUE#3692] Use new distro implmentation to handle init all datum request. (#3744)

* Add load data task in DistroProtocol

* Use new distro implmentation to handle init all datum request.

* Fix unit test

* fix: #3617 (#3678)

* fix #3617

* 调整代码格式

* 修改抛出的Exception类型

* 调整逻辑

* 移除没用到的方法

* 修改注释

* [ISSUE#3658] Move distro sync code to nacos-core module (#3750)

* Move distro sync code to nacos-core module

* Update unit test

* feat: none

* fix: fixing serialization problems

* replace the deprecated api com.fasterxml.jackson.databind.node.ObjectNode#put(java.lang.String, com.fasterxml.jackson.databind.JsonNode)

* Revert "[#3368]Cancel empty Long polling thread to improve performance. (#ISSUE3432)" (#3778)

This reverts commit 95c8bf242b.

* [ISSUE #3658] Some enhance refactor for naming distro (#3765)

* Some enhance refactor for naming distro

* Remove null code

* [ISSUE #3687] check serviceName's format(groupName@@serviceName) in server and client (#3767)

* 1.in server, check serviceName's format 'groupName@@serviceName', groupName and serviceName can't be blank
2.in client, check 'groupName@@serviceName', groupName and serviceName can't be blank

* ignore the check to groupName

* check split's length instead of exception to check argument

* 1.add some notes
2.remove unnecessary code

* modify the notes

* [ISSUE#3790] Supplement http response Content-Encoding processing. (#3791)

* bug: fix issue #3790, Supplement http response Content-Encoding processing

* bug: fix issue #3790, Supplement http response Content-Encoding processing.

* bug: fix issue #3790, Supplement http response Content-Encoding processing.

* Update ConvertUtils.java (#3789)

* fix ConvertUtils can not handle FormatException.

* fix: fixed some logic errors

* [ISSUE#3192] naming module replace http client (#3763)

* naming module replace http client

* refactor: naming module replace http client.

* refactor: naming module replace http client.

* refactor: Add apache http client Factory.

* refactor: naming module replace http client.

* fix code style

* refactor: Add http client config

* refactor: naming module HttpClientManager change

* refactor: naming module HttpClientManager change

* refactor: naming module replace http client.

* fix code style

* refactor: fix JDK http client Use error problem.

* refactor: Query And Header entity init Add non-empty judgment

* Enhance the asynchronous http delete request method to support body passing parameters.

* refactor: apache http client set MaxConnTotal and maxConnPerRoute.

* Fix NullPointerException when no subscriber for slow event (#3835)

* Set mediaType charset as utf8 (#3837)

* Fix code style problem in DiskUtils (#3842)

* Fix http client contentType charset problem (#3848)

* feature issue #3804 (#3805)

* improvement: merge upstream/develop

* feat: merge upstream develop

* feat: manage the loading of configuration files uniformly

* fix: fix copyright style

* style: fix code style

* fix: fix code style

* bug: fix the problem of incorrect judgment of http response code in SubscribeManager#getSubscribers() method (#3879)

* [ISSUE #3867] replace the way which get version (#3872)

* replace the way which get version

* remove version sign application.properties in nacos-api

* [ISSUE #3871] fix description don't match the error (#3886)

* Fix jraft problem

* Fix chinese string are truncated in ConcunrrentDiskUtil (#3883)

* Temp fix raft server can't refresh raft configuration problem

* update spring boot dependencies version (#3900)

Co-authored-by: yanlinly <yan.lin2009@163.com>
Co-authored-by: 杨翊 SionYang <263976490@qq.com>

* [ISSUE #3781]Fix service list intermittently lost service (#3891)

* update service init

* commit futureMap.remove()

* update serviceManager

Co-authored-by: yanlinly <yan.lin2009@163.com>
Co-authored-by: 杨翊 SionYang <263976490@qq.com>

* Fix Listener do not listen new consistency problem

* Fix Performance logger thread call old raft error

* Use datum in new raft processor to compatible old data

* Use multiple kv storage in new raft processor to compatible old data

* Revert PR#2849.

* Move datum key check to KeyBuilder

* Fix 1.3.2 upgrade 1.4.0 can't notify service change problem

* [ISSUE #3850] ignore socket exception when client destroy already (#3906)

* if client destroy already, ignore socket exception.

* remove the exception's judgement

* remove unuseful import

* fix: fix merge conflict

* isAddressServerHealth set as true when request success (#3952)

* [ISSUE#3533] change cache dir with namespace -- part 1: unify the cache dir (#3859)

* [ISSUE#3533] change cache dir with namespace -- part 2: unify the log dir (#3882)

* fix typo error (#3954)

* [ISSUE #3909] add domain's judgement (#3913)

* add domain's judgement

* modify domain's judgement, can resolve = true

* remove judgement in 'if' code block

* replace Ip to IP in InetUtils

* log warn info when domain can not be resolved

* fix vaiable name

* 1.fix unit test can't pass (#3956)

2.update the unit test

* Move remove listener logic to ServiceManager

* Move remove listener logic to ServiceManager

* Fix#3973 (#3974)

* fix #3973

* 重复代码抽取到一个方法

* 删除私有方法的注释

* 处理namespace参数的方法提出到一个工具类中

* 修改注释

* 添加licences

* 增加 TenantUtil 的测试

* TenantUtil 改名为 NamespaceUtil

* For #3384, Fix member extend info do not update error. (#3982)

* refactor: code refactor

Co-authored-by: 赵延 <1060026287@qq.com>
Co-authored-by: mai.jh <maijh97@gmail.com>
Co-authored-by: ljhrot <296093710@qq.com>
Co-authored-by: Xarrow <zhangjian12424@gmail.com>
Co-authored-by: 杨翊 SionYang <263976490@qq.com>
Co-authored-by: Gagharv <wwfortunate@gmail.com>
Co-authored-by: syapollo <34880947+syapollo@users.noreply.github.com>
Co-authored-by: S2W <joexsue@foxmail.com>
Co-authored-by: Tboy <technotboy@yeah.net>
Co-authored-by: 邪影oO <213539@qq.com>
Co-authored-by: yanlinly <yan.lin2009@163.com>
Co-authored-by: Mark4z <36187602+mark4z@users.noreply.github.com>
Co-authored-by: Marcus <anymre@outlook.com>
Co-authored-by: shizhengxing <798187024@qq.com>
Co-authored-by: ljhrot <ljhrot@qq.com>
Co-authored-by: sanxun0325 <bbz17640380550@163.com>
Co-authored-by: JackSun-Developer <sjtusl@163.com>
2020-10-14 19:33:33 +08:00
chuntaojun
b4e9950b17 refactor: code refactor 2020-10-14 19:32:22 +08:00
JackSun-Developer
7527d76743
[ISSUE #3576] [Enhancement] Adding the destroy lifecycle method on NamingMaintainService (#3985) 2020-10-14 10:17:06 +08:00
liaochuntao
b6bc4bb12f
Fix issue 2866 (#3984)
* improvement: merge upstream/develop

* feat: merge upstream develop

* fix: fix issue 2892
2020-10-14 09:52:18 +08:00
chuntaojun
ff9f31811e Merge branch 'develop' of https://github.com/alibaba/nacos into jraft_naming 2020-10-13 20:54:38 +08:00
杨翊 SionYang
2e553ef5ea
For #3384, Fix member extend info do not update error. (#3982) 2020-10-13 20:54:12 +08:00
邪影oO
13599fd83d
Fix#3973 (#3974)
* fix #3973

* 重复代码抽取到一个方法

* 删除私有方法的注释

* 处理namespace参数的方法提出到一个工具类中

* 修改注释

* 添加licences

* 增加 TenantUtil 的测试

* TenantUtil 改名为 NamespaceUtil
2020-10-13 15:48:46 +08:00
chuntaojun
73a29ebc85 Merge branch 'jraft-naming' of https://github.com/KomachiSion/nacos into jraft_naming 2020-10-13 15:16:08 +08:00
chuntaojun
686ff8d886 Merge branch 'jraft_naming' of https://github.com/chuntaojun/nacos into jraft_naming 2020-10-13 15:15:53 +08:00
KomachiSion
b3b6c30ef0 Move remove listener logic to ServiceManager 2020-10-12 16:00:50 +08:00
KomachiSion
b8b111320a Move remove listener logic to ServiceManager 2020-10-12 14:17:31 +08:00
赵延
49ff149dfb
1.fix unit test can't pass (#3956)
2.update the unit test
2020-10-12 13:13:07 +08:00
赵延
c0496b364e
[ISSUE #3909] add domain's judgement (#3913)
* add domain's judgement

* modify domain's judgement, can resolve = true

* remove judgement in 'if' code block

* replace Ip to IP in InetUtils

* log warn info when domain can not be resolved

* fix vaiable name
2020-10-12 12:19:02 +08:00
赵延
d6cc8ce5b0
fix typo error (#3954) 2020-10-12 12:18:14 +08:00
JackSun-Developer
714b9671a3
[ISSUE#3533] change cache dir with namespace -- part 2: unify the log dir (#3882) 2020-10-12 11:25:06 +08:00
JackSun-Developer
17be3984e7
[ISSUE#3533] change cache dir with namespace -- part 1: unify the cache dir (#3859) 2020-10-12 11:24:22 +08:00
chuntaojun
3c8b84166c refactor: merge upstream jraft-naming 2020-10-11 22:11:47 +08:00
chuntaojun
04fcbeba31 Merge branch 'develop' of https://github.com/alibaba/nacos into jraft_naming 2020-10-06 22:00:48 +08:00
赵延
5745922786
isAddressServerHealth set as true when request success (#3952) 2020-10-06 21:53:23 +08:00
chuntaojun
4987276eda fix: fix merge conflict 2020-09-30 17:14:57 +08:00
chuntaojun
8ad399a4aa feat: merge upstream develop 2020-09-30 17:00:39 +08:00
chuntaojun
c442a71a5f Merge branch 'jraft-naming' of https://github.com/KomachiSion/nacos into jraft_naming 2020-09-30 14:24:27 +08:00
赵延
f6c6a9f3b2
[ISSUE #3850] ignore socket exception when client destroy already (#3906)
* if client destroy already, ignore socket exception.

* remove the exception's judgement

* remove unuseful import
2020-09-30 13:14:42 +08:00
chuntaojun
a6a09d221f refactor: merge xiwen branch 2020-09-30 01:17:02 +08:00
KomachiSion
ea515428ce Fix 1.3.2 upgrade 1.4.0 can't notify service change problem 2020-09-25 18:55:57 +08:00
KomachiSion
402ad12c85 Move datum key check to KeyBuilder 2020-09-25 15:17:12 +08:00
KomachiSion
481a1f972f Revert PR#2849. 2020-09-25 15:06:21 +08:00
KomachiSion
170f979d44 Use multiple kv storage in new raft processor to compatible old data 2020-09-25 13:58:19 +08:00