8000 Release 0.9.0 Nacos : Nacos server function mode and fix 13 issues by xuechaos · Pull Request #849 · alibaba/nacos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release 0.9.0 Nacos : Nacos server function mode and fix 13 issues #849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 59 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b67c6e1
Merge pull request #4 from alibaba/develop
paderlol Jan 26, 2019
d302335
Fix #711
paderlol Jan 26, 2019
129e295
Fix #711
Jan 30, 2019
e33f2b0
Merge pull request #712 from paderlol/develop
Jan 30, 2019
589d6c3
fix: closes #735
loadchange Feb 1, 2019
fadea95
Merge pull request #3 from alibaba/develop
jifengnan Feb 1, 2019
e40d899
Fix the issue which the server started failed if folder names contain…
jifengnan Feb 1, 2019
ab7e788
#720 Memory leak in PushService
huangyunbin Feb 12, 2019
4eaf0e7
fix not support java 1.7
Feb 13, 2019
eac25d6
Merge pull request #764 from alibaba/hotfix_standalone_register_failed
Feb 14, 2019
f497f6c
Fix #756
nkorange Feb 14, 2019
9029e28
Merge pull request #765 from alibaba/feature_validate_service_format
Feb 14, 2019
5c0ee84
Merge pull request #749 from huangyunbin/udp
Feb 15, 2019
5760d13
Fix https://github.com/alibaba/nacos/issues/768: Client beat interval.
darkness463 Feb 15, 2019
ee9447c
Merge pull request #776 from darkness463/develop
Feb 17, 2019
f4c8d68
Merge pull request #5 from alibaba/develop
paderlol Feb 17, 2019
b8aaa5a
Fix The number of configurations in the details of the default public…
paderlol Feb 17, 2019
4744380
Merge branch 'develop' into feature_metrics
Feb 18, 2019
45d94f8
metrics
Feb 18, 2019
ea618a0
Merge pull request #778 from paderlol/develop
hxy1991 Feb 18, 2019
12432b0
Merge pull request #754 from alibaba/feature_metrics
hxy1991 Feb 18, 2019
2c1d95d
signalPublish with not STANDALONE_MODE
luoxn28 Feb 21, 2019
eb87625
fetch self ip
Feb 22, 2019
999a244
fix read property file error
Feb 25, 2019
2b38145
fix UT error
Feb 25, 2019
47e7531
constant
Feb 25, 2019
7b60e2e
getBoolean
Feb 25, 2019
5b711c6
static
Feb 25, 2019
6b448c4
Merge pull request #820 from alibaba/feature_fetchIp
TsingLiang Feb 25, 2019
56f91e7
#821 Registering instance should update valid (health)
nanamikon Feb 25, 2019
1f943de
Fix #824
nkorange Feb 25, 2019
5656642
Merge pull request #825 from alibaba/feature_empty_service_list
Feb 26, 2019
0e9d3e6
Fixes #240 #826 #827 #828
hxy1991 Feb 26, 2019
5580a95
Merge pull request #830 from hxy1991/feature_refactoring_log
hxy1991 Feb 26, 2019
f6527ed
Since you want to align, you are all aligned.
Feb 26, 2019
af016f0
Fixes #814
hxy1991 Feb 27, 2019
931a0f4
Merge pull request #835 from hxy1991/fix_814
Feb 27, 2019
5711ace
function mode server code completed
xuechaos Feb 27, 2019
e9a7cfe
issues template update optimization
xuechaos Feb 27, 2019
1f7c2f9
Merge pull request #823 from nanamikon/issues-821
Feb 27, 2019
718ec5a
#821 Registering instance should update valid (health)
nanamikon Feb 28, 2019
c1b7028
Merge pull request #843 from nanamikon/issues-823
Feb 28, 2019
1e1e1be
Merge pull request #810 from luoxn28/master
Feb 28, 2019
fdab482
feat: optimize Console version && Menu
loadchange Feb 28, 2019
b1b9bee
fix: Defragment code indentation
loadchange Feb 28, 2019
9636e81
Merge pull request #740 from jifengnan/develop
xuechaos Feb 28, 2019
f62c66e
Merge pull request #833 from systp/master
xuechaos Feb 28, 2019
979c2bd
fix: code indentation
loadchange Feb 28, 2019
678fc8a
update version get for pom
xuechaos Feb 28, 2019
41e6ec9
Fixes #826
hxy1991 Feb 28, 2019
0ca7323
#588 build client and dependenties use 1.6
xuechaos Feb 28, 2019
04bc0e2
Merge pull request #738 from loadchange/issues-735
jameslcj Feb 28, 2019
ff51baa
add lisence
xuechaos Feb 28, 2019
dc03530
Merge pull request #846 from hxy1991/fix_826
hxy1991 Feb 28, 2019
f88b801
merge develop to fix merge
xuechaos Feb 28, 2019
4aed990
Merge pull request #847 from alibaba/function_mode
xuechaos Feb 28, 2019
6a6fe71
fix: state compatible
loadchange Feb 28, 2019
07973d3
Merge pull request #848 from alibaba/function_mode
xuechaos Feb 28, 2019
80c260e
Release 0.9.0 Nacos : Nacos server function mode and fix 13 issues
xuechaos Feb 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view 8000
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- Here is for bug reports and feature requests ONLY!

If you're looking for help, please check our mail list、WeChat group and the Gitter room.

Please try to use English to describe your issue, or at least provide a snippet of English translation.
我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
-->

## Issue Description

Type: *bug report* or *feature request*

### Describe what happened (or what feature you want)


### Describe what you expected to happen


### How to reproduce it (as minimally and precisely as possible)

1.
2.
3.

### Tell us your environment


### Anything else we need to know?
43 changes: 0 additions & 43 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.9.0(Feb 28, 2019)

* [#840] Nacos server adds startup mode to distinguish between config and naming.
* [#762] Register instance returns failed when the health check mode is 'server' in standalone mode.
* [#473] Nacos Cluster Mode kubernate Startup nacos.log error Log.
* [#240] Log strong dependence problem.
* [#824] getServicesOfServer throws exception if service list is empty.
* [#802] Nacos server multi-boot mode support.
* [#800] Nacos's client-to-server addressing mode document introduction.
* [#768] The interval at which the heartbeat is sent in BeatReactor is not controlled by the server return value.
* [#759] why instance can't auto-delete.
* [#756] Format of instance and service should be validated.
* [#720] Memory leak in PushService.
* [#653] IoUtils under nacos-common-0.2.1-RC1.jar lacks "" judgment on encoding.
* [#588] Client compatible to jdk1.6.

## 0.8.0(Jan 22, 2019) PRE-GA

* [#162] Support open metrics and prometheus
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ It is super easy to get started with your first project.

You can download the package from the [latest stable release](https://github.com/alibaba/nacos/releases).

Take release nacos-server-0.8.0.zip for example.
Take release nacos-server-0.9.0.zip for example.
```
unzip nacos-server-0.8.0.zip
unzip nacos-server-0.9.0.zip
cd nacos/bin
```

Expand Down
6 changes: 3 additions & 3 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0</version>
<version>0.9.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -32,8 +32,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
<source>6</source>
<target>6</target>
</configuration>
</plugin>
</plugins>
Expand Down
20 changes: 16 additions & 4 deletions client/pom.xml
A92E
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0</version>
<version>0.9.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -43,7 +43,6 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.2</version>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -108,9 +107,22 @@
</dependency>

<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient</artifactId>
<version>0.5.0</version>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>6</source>
<target>6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@
import com.alibaba.nacos.client.config.impl.HttpSimpleClient.HttpResult;
import com.alibaba.nacos.client.config.impl.LocalConfigInfoProcessor;
import com.alibaba.nacos.client.config.utils.ContentUtils;
import com.alibaba.nacos.client.config.utils.LogUtils;
import com.alibaba.nacos.client.config.utils.ParamUtils;
import com.alibaba.nacos.client.config.utils.TenantUtil;
import com.alibaba.nacos.client.logger.Logger;
import com.alibaba.nacos.client.logger.support.LoggerHelper;
import com.alibaba.nacos.client.utils.LogUtils;
import com.alibaba.nacos.client.utils.StringUtils;
import org.slf4j.Logger;

import java.io.IOException;
import java.net.HttpURLConnection;
Expand All @@ -52,8 +51,9 @@
@SuppressWarnings("PMD.ServiceOrDaoClassShouldEndWithImplRule")
public class NacosConfigService implements ConfigService {

final static public Logger log = LogUtils.logger(NacosConfigService.class);
public final long POST_TIMEOUT = 3000L;
private static final Logger LOGGER = LogUtils.logger(NacosConfigService.class);

private final long POST_TIMEOUT = 3000L;
/**
* http agent
*/
Expand Down Expand Up @@ -123,8 +123,8 @@ private String getConfigInner(String tenant, String dataId, String group, long t
// 优先使用本地配置
String content = LocalConfigInfoProcessor.getFailover(agent.getName(), dataId, group, tenant);
if (content != null) {
log.warn(agent.getName(), "[get-config] get failover ok, dataId={}, group={}, tenant={}, config={}", dataId,
group, tenant, ContentUtils.truncateContent(content));
LOGGER.warn("[{}] [get-config] get failover ok, dataId={}, group={}, tenant={}, config={}", agent.getName(),
dataId, group, tenant, ContentUtils.truncateContent(content));
cr.setContent(content);
configFilterChainManager.doFilter(null, cr);
content = cr.getContent();
Expand All @@ -143,14 +143,12 @@ private String getConfigInner(String tenant, String dataId, String group, long t
if (NacosException.NO_RIGHT == ioe.getErrCode()) {
throw ioe;
}
log.warn("NACOS-0003",
LoggerHelper.getErrorCodeStr("NACOS", "NACOS-0003", "环境问题", "get from server error"));
log.warn(agent.getName(), "[get-config] get from server error, dataId={}, group={}, tenant={}, msg={}",
dataId, group, tenant, ioe.toString());
LOGGER.warn("[{}] [get-config] get from server error, dataId={}, group={}, tenant={}, msg={}",
agent.getName(), dataId, group, tenant, ioe.toString());
}

log.warn(agent.getName(), "[get-config] get snapshot ok, dataId={}, group={}, tenant={}, config={}", dataId,
group, tenant, ContentUtils.truncateContent(content));
LOGGER.warn("[{}] [get-config] get snapshot ok, dataId={}, group={}, tenant={}, config={}", agent.getName(),
dataId, group, tenant, ContentUtils.truncateContent(content));
content = LocalConfigInfoProcessor.getSnapshot(agent.getName(), dataId, group, tenant);
cr.setContent(content);
configFilterChainManager.doFilter(null, cr);
Expand Down Expand Up @@ -183,20 +181,20 @@ private boolean removeConfigInner(String tenant, String dataId, String group, St
try {
result = agent.httpDelete(url, null, params, encode, POST_TIMEOUT);
} catch (IOException ioe) {
log.warn("[remove] error, " + dataId + ", " + group + ", " + tenant + ", msg: " + ioe.toString());
LOGGER.warn("[remove] error, " + dataId + ", " + group + ", " + tenant + ", msg: " + ioe.toString());
return false;
}

if (HttpURLConnection.HTTP_OK == result.code) {
log.info(agent.getName(), "[remove] ok, dataId={}, group={}, tenant={}", dataId, group, tenant);
LOGGER.info("[{}] [remove] ok, dataId={}, group={}, tenant={}", agent.getName(), dataId, group, tenant);
return true;
} else if (HttpURLConnection.HTTP_FORBIDDEN == result.code) {
log.warn(agent.getName(), "[remove] error, dataId={}, group={}, tenant={}, code={}, msg={}", dataId, group,
tenant, result.code, result.content);
LOGGER.warn("[{}] [remove] error, dataId={}, group={}, tenant={}, code={}, msg={}", agent.getName(), dataId,
group, tenant, result.code, result.content);
throw new NacosException(result.code, result.content);
} else {
log.warn(agent.getName(), "[remove] error, dataId={}, group={}, tenant={}, code={}, msg={}", dataId, group,
tenant, result.code, result.content);
LOGGER.warn("[{}] [remove] error, dataId={}, group={}, tenant={}, code={}, msg={}", agent.getName(), dataId,
group, tenant, result.code, result.content);
return false;
}
}
Expand Down Expand Up @@ -245,24 +243,22 @@ private boolean publishConfigInner(String tenant, String dataId, String group, S
try {
result = agent.httpPost(url, headers, params, encode, POST_TIMEOUT);
} catch (IOException ioe) {
log.warn("NACOS-0006",
LoggerHelper.getErrorCodeStr("NACOS", "NACOS-0006", "环境问题", "[publish-single] exception"));
log.warn(agent.getName(), "[publish-single] exception, dataId={}, group={}, msg={}", dataId, group,
ioe.toString());
LOGGER.warn("[{}] [publish-single] exception, dataId={}, group={}, msg={}", agent.getName(), dataId,
group, ioe.toString());
return false;
}

if (HttpURLConnection.HTTP_OK == result.code) {
log.info(agent.getName(), "[publish-single] ok, dataId={}, group={}, tenant={}, config={}", dataId, group,
tenant, ContentUtils.truncateContent(content));
LOGGER.info("[{}] [publish-single] ok, dataId={}, group={}, tenant={}, config={}", agent.getName(), dataId,
group, tenant, ContentUtils.truncateContent(content));
return true;
} else if (HttpURLConnection.HTTP_FORBIDDEN == result.code) {
log.warn(agent.getName(), "[publish-single] error, dataId={}, group={}, tenant={}, code={}, msg={}", dataId,
group, tenant, result.code, result.content);
L 10000 OGGER.warn("[{}] [publish-single] error, dataId={}, group={}, tenant={}, code={}, msg={}", agent.getName(),
dataId, group, tenant, result.code, result.content);
throw new NacosException(result.code, result.content);
} else {
log.warn(agent.getName(), "[publish-single] error, dataId={}, group={}, tenant={}, code={}, msg={}", dataId,
group, tenant, result.code, result.content);
LOGGER.warn("[{}] [publish-single] error, dataId={}, group={}, tenant={}, code={}, msg={}", agent.getName(),
dataId, group, tenant, result.code, result.content);
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.client.config.impl.HttpSimpleClient.HttpResult;
import com.alibaba.nacos.client.monitor.MetricsMonitor;
import io.prometheus.client.Histogram;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;

/**
* MetricsHttpAgent
Expand All @@ -42,58 +42,50 @@ public void start() throws NacosException {

@Override
public HttpResult httpGet(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException {
long start = System.currentTimeMillis();
long end = 0;
Histogram.Timer timer = MetricsMonitor.getConfigRequestMonitor("GET", path, "NA");
HttpResult result = null;
try {
result = httpAgent.httpGet(path, headers, paramValues, encoding, readTimeoutMs);
} catch (IOException e) {
end = System.currentTimeMillis();
MetricsMonitor.getConfigRequestMonitor("GET", path, "NA").record(end - start, TimeUnit.MILLISECONDS);
throw e;
} finally {
timer.observeDuration();
timer.close();
}

end = System.currentTimeMillis();
MetricsMonitor.getConfigRequestMonitor("GET", path, String.valueOf(result.code)).record(end - start, TimeUnit.MILLISECONDS);

return result;
}

@Override
public HttpResult httpPost(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException {
long start = System.currentTimeMillis();
long end = 0;
Histogram.Timer timer = MetricsMonitor.getConfigRequestMonitor("POST", path, "NA");
HttpResult result = null;
try {
result = httpAgent.httpPost(path, headers, paramValues, encoding, readTimeoutMs);
} catch (IOException e) {
end = System.currentTimeMillis();
MetricsMonitor.getConfigRequestMonitor("POST", path, "NA").record(end - start, TimeUnit.MILLISECONDS);
throw e;
} finally {
timer.observeDuration();
timer.close();
}

end = System.currentTimeMillis();
MetricsMonitor.getConfigRequestMonitor("POST", path, String.valueOf(result.code)).record(end - start, TimeUnit.MILLISECONDS);

return result;
}

@Override
public HttpResult httpDelete(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException {
long start = System.currentTimeMillis();
long end = 0;
Histogram.Timer timer = MetricsMonitor.getConfigRequestMonitor("DELETE", path, "NA");
HttpResult result = null;
try {
result = httpAgent.httpDelete(path, headers, paramValues, encoding, readTimeoutMs);
} catch (IOException e) {
end = System.currentTimeMillis();
MetricsMonitor.getConfigRequestMonitor("DELETE", path, "NA").record(end - start, TimeUnit.MILLISECONDS);

throw e;
} finally {
timer.observeDuration();
timer.close();
}

end = System.currentTimeMillis();
MetricsMonitor.getConfigRequestMonitor("DELETE", path, String.valueOf(result.code)).record(end - start, TimeUnit.MILLISECONDS);

return result;
}

Expand All @@ -117,3 +109,4 @@ public String getEncode() {
return httpAgent.getEncode();
}
}

Loading
0