diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ed5af758..30679a66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,4 @@ # Change Log --- -- [the server address only support one ip](https://github.com/Tencent/spring-cloud-tencent/pull/36) -- [feature: get service list by given namespace](https://github.com/Tencent/spring-cloud-tencent/pull/38) -- [feat:Support multi-discovery server.](https://github.com/Tencent/spring-cloud-tencent/pull/42) -- [fix:fix [Deserialization of Untrusted Data in logback]](https://github.com/Tencent/spring-cloud-tencent/pull/44/files) -- [feat:support customize registered ip address.](https://github.com/Tencent/spring-cloud-tencent/pull/47) -- [fix:fix import default log implement error](https://github.com/Tencent/spring-cloud-tencent/pull/53) -- [send heartbeat if healthcheck url not configured](https://github.com/Tencent/spring-cloud-tencent/pull/54) -- [feat:optimize project structure and checkstyle](https://github.com/Tencent/spring-cloud-tencent/pull/56) -- [feat:divide storage and transfer of metadata.](https://github.com/Tencent/spring-cloud-tencent/pull/63) -- [feat:support polaris config center.](https://github.com/Tencent/spring-cloud-tencent/pull/69) -- [feat:optimize metadata module.](https://github.com/Tencent/spring-cloud-tencent/pull/70) -- [feat: optimize pom dependency and demo](https://github.com/Tencent/spring-cloud-tencent/pull/71) -- [feat:upgrade polaris version to 1.3.0.](https://github.com/Tencent/spring-cloud-tencent/pull/72) -- [feat:rollback init polaris-context to application phase](https://github.com/Tencent/spring-cloud-tencent/pull/73) -- [feat:tencent-commons add spring-cloud-starter dependency](https://github.com/Tencent/spring-cloud-tencent/pull/76) -- [fix:fix fetching wrong PEER_SERVICE in SCG filter.](https://github.com/Tencent/spring-cloud-tencent/pull/83) +- [Bugfix: fix causing cpu 100% when set ScheduledThreadPoolExecutor corePoolSize=0](https://github.com/Tencent/spring-cloud-tencent/pull/99) diff --git a/changes/changes-1.2.0.md b/changes/changes-1.2.0.md new file mode 100644 index 000000000..1ed5af758 --- /dev/null +++ b/changes/changes-1.2.0.md @@ -0,0 +1,19 @@ +# Change Log +--- + +- [the server address only support one ip](https://github.com/Tencent/spring-cloud-tencent/pull/36) +- [feature: get service list by given namespace](https://github.com/Tencent/spring-cloud-tencent/pull/38) +- [feat:Support multi-discovery server.](https://github.com/Tencent/spring-cloud-tencent/pull/42) +- [fix:fix [Deserialization of Untrusted Data in logback]](https://github.com/Tencent/spring-cloud-tencent/pull/44/files) +- [feat:support customize registered ip address.](https://github.com/Tencent/spring-cloud-tencent/pull/47) +- [fix:fix import default log implement error](https://github.com/Tencent/spring-cloud-tencent/pull/53) +- [send heartbeat if healthcheck url not configured](https://github.com/Tencent/spring-cloud-tencent/pull/54) +- [feat:optimize project structure and checkstyle](https://github.com/Tencent/spring-cloud-tencent/pull/56) +- [feat:divide storage and transfer of metadata.](https://github.com/Tencent/spring-cloud-tencent/pull/63) +- [feat:support polaris config center.](https://github.com/Tencent/spring-cloud-tencent/pull/69) +- [feat:optimize metadata module.](https://github.com/Tencent/spring-cloud-tencent/pull/70) +- [feat: optimize pom dependency and demo](https://github.com/Tencent/spring-cloud-tencent/pull/71) +- [feat:upgrade polaris version to 1.3.0.](https://github.com/Tencent/spring-cloud-tencent/pull/72) +- [feat:rollback init polaris-context to application phase](https://github.com/Tencent/spring-cloud-tencent/pull/73) +- [feat:tencent-commons add spring-cloud-starter dependency](https://github.com/Tencent/spring-cloud-tencent/pull/76) +- [fix:fix fetching wrong PEER_SERVICE in SCG filter.](https://github.com/Tencent/spring-cloud-tencent/pull/83) diff --git a/pom.xml b/pom.xml index c4614488d..136f7dd35 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ - 1.2.0-Greenwich + 1.3.0-Greenwich-SNAPSHOT Greenwich.SR6 diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java index 7e72a075d..bd6f0c24b 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java @@ -18,8 +18,8 @@ package com.tencent.cloud.polaris.registry; +import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import com.tencent.cloud.common.metadata.config.MetadataLocalProperties; @@ -71,13 +71,11 @@ public class PolarisServiceRegistry implements ServiceRegistry { this.polarisDiscoveryProperties = polarisDiscoveryProperties; this.polarisDiscoveryHandler = polarisDiscoveryHandler; this.metadataLocalProperties = metadataLocalProperties; + if (polarisDiscoveryProperties.isHeartbeatEnabled()) { - ScheduledThreadPoolExecutor heartbeatExecutor = new ScheduledThreadPoolExecutor( - 0, new NamedThreadFactory("spring-cloud-heartbeat")); - heartbeatExecutor.setMaximumPoolSize(1); - this.heartbeatExecutor = heartbeatExecutor; - } - else { + this.heartbeatExecutor = Executors + .newSingleThreadScheduledExecutor(new NamedThreadFactory("spring-cloud-heartbeat")); + } else { this.heartbeatExecutor = null; } } diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index 1515862d5..26afaa987 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -62,7 +62,7 @@ - 1.2.0-Greenwich + 1.3.0-Greenwich-SNAPSHOT 1.3.1