repo_name stringclasses 5 values | pr_number int64 1.52k 15.5k | pr_title stringlengths 8 143 | pr_description stringlengths 0 10.2k | author stringlengths 3 18 | date_created timestamp[ns, tz=UTC] | date_merged timestamp[ns, tz=UTC] | previous_commit stringlengths 40 40 | pr_commit stringlengths 40 40 | query stringlengths 11 10.2k | filepath stringlengths 6 220 | before_content stringlengths 0 597M | after_content stringlengths 0 597M | label int64 -1 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AbstractIntegrationTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal;
import com.ctrip.framework.apollo.SkipAuthorizationConfiguration;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import javax.annotation.PostConstruct;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = {
PortalApplication.class,
SkipAuthorizationConfiguration.class
}, webEnvironment = WebEnvironment.RANDOM_PORT)
public abstract class AbstractIntegrationTest {
protected RestTemplate restTemplate = (new TestRestTemplate()).getRestTemplate();
@PostConstruct
private void postConstruct() {
System.setProperty("spring.profiles.active", "test");
restTemplate.setErrorHandler(new DefaultResponseErrorHandler());
}
@Value("${local.server.port}")
int port;
protected String url(String path) {
return "http://localhost:" + port + path;
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal;
import com.ctrip.framework.apollo.SkipAuthorizationConfiguration;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import javax.annotation.PostConstruct;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = {
PortalApplication.class,
SkipAuthorizationConfiguration.class
}, webEnvironment = WebEnvironment.RANDOM_PORT)
public abstract class AbstractIntegrationTest {
protected RestTemplate restTemplate = (new TestRestTemplate()).getRestTemplate();
@PostConstruct
private void postConstruct() {
System.setProperty("spring.profiles.active", "test");
restTemplate.setErrorHandler(new DefaultResponseErrorHandler());
}
@Value("${local.server.port}")
int port;
protected String url(String path) {
return "http://localhost:" + port + path;
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./scripts/apollo-on-kubernetes/kubernetes/apollo-env-prod/service-apollo-config-server-prod.yaml | #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
# configmap for apollo-config-server-prod
kind: ConfigMap
apiVersion: v1
metadata:
namespace: sre
name: configmap-apollo-config-server-prod
data:
application-github.properties: |
spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-prod-env.sre:3306/ProdApolloConfigDB?characterEncoding=utf8
spring.datasource.username = FillInCorrectUser
spring.datasource.password = FillInCorrectPassword
eureka.service.url = http://statefulset-apollo-config-server-prod-0.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-1.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-2.service-apollo-meta-server-prod:8080/eureka/
---
kind: Service
apiVersion: v1
metadata:
namespace: sre
name: service-apollo-meta-server-prod
labels:
app: service-apollo-meta-server-prod
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
selector:
app: pod-apollo-config-server-prod
type: ClusterIP
clusterIP: None
sessionAffinity: ClientIP
---
kind: Service
apiVersion: v1
metadata:
namespace: sre
name: service-apollo-config-server-prod
labels:
app: service-apollo-config-server-prod
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30005
selector:
app: pod-apollo-config-server-prod
type: NodePort
sessionAffinity: ClientIP
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
namespace: sre
name: statefulset-apollo-config-server-prod
labels:
app: statefulset-apollo-config-server-prod
spec:
serviceName: service-apollo-meta-server-prod
replicas: 3
selector:
matchLabels:
app: pod-apollo-config-server-prod
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: pod-apollo-config-server-prod
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- pod-apollo-config-server-prod
topologyKey: kubernetes.io/hostname
volumes:
- name: volume-configmap-apollo-config-server-prod
configMap:
name: configmap-apollo-config-server-prod
items:
- key: application-github.properties
path: application-github.properties
containers:
- image: apollo-config-server:v1.0.0
securityContext:
privileged: true
imagePullPolicy: IfNotPresent
name: container-apollo-config-server-prod
ports:
- protocol: TCP
containerPort: 8080
volumeMounts:
- name: volume-configmap-apollo-config-server-prod
mountPath: /apollo-config-server/config/application-github.properties
subPath: application-github.properties
env:
- name: APOLLO_CONFIG_SERVICE_NAME
value: "service-apollo-config-server-prod.sre"
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 120
periodSeconds: 10
dnsPolicy: ClusterFirst
restartPolicy: Always | #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
# configmap for apollo-config-server-prod
kind: ConfigMap
apiVersion: v1
metadata:
namespace: sre
name: configmap-apollo-config-server-prod
data:
application-github.properties: |
spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-prod-env.sre:3306/ProdApolloConfigDB?characterEncoding=utf8
spring.datasource.username = FillInCorrectUser
spring.datasource.password = FillInCorrectPassword
eureka.service.url = http://statefulset-apollo-config-server-prod-0.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-1.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-2.service-apollo-meta-server-prod:8080/eureka/
---
kind: Service
apiVersion: v1
metadata:
namespace: sre
name: service-apollo-meta-server-prod
labels:
app: service-apollo-meta-server-prod
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
selector:
app: pod-apollo-config-server-prod
type: ClusterIP
clusterIP: None
sessionAffinity: ClientIP
---
kind: Service
apiVersion: v1
metadata:
namespace: sre
name: service-apollo-config-server-prod
labels:
app: service-apollo-config-server-prod
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30005
selector:
app: pod-apollo-config-server-prod
type: NodePort
sessionAffinity: ClientIP
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
namespace: sre
name: statefulset-apollo-config-server-prod
labels:
app: statefulset-apollo-config-server-prod
spec:
serviceName: service-apollo-meta-server-prod
replicas: 3
selector:
matchLabels:
app: pod-apollo-config-server-prod
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: pod-apollo-config-server-prod
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- pod-apollo-config-server-prod
topologyKey: kubernetes.io/hostname
volumes:
- name: volume-configmap-apollo-config-server-prod
configMap:
name: configmap-apollo-config-server-prod
items:
- key: application-github.properties
path: application-github.properties
containers:
- image: apollo-config-server:v1.0.0
securityContext:
privileged: true
imagePullPolicy: IfNotPresent
name: container-apollo-config-server-prod
ports:
- protocol: TCP
containerPort: 8080
volumeMounts:
- name: volume-configmap-apollo-config-server-prod
mountPath: /apollo-config-server/config/application-github.properties
subPath: application-github.properties
env:
- name: APOLLO_CONFIG_SERVICE_NAME
value: "service-apollo-config-server-prod.sre"
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 120
periodSeconds: 10
dnsPolicy: ClusterFirst
restartPolicy: Always | -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ControllerExceptionTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.adminservice.controller;
import com.ctrip.framework.apollo.biz.service.AdminService;
import com.ctrip.framework.apollo.biz.service.AppService;
import com.ctrip.framework.apollo.common.dto.AppDTO;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.common.exception.NotFoundException;
import com.ctrip.framework.apollo.common.exception.ServiceException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import java.util.ArrayList;
import java.util.List;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class ControllerExceptionTest {
private AppController appController;
@Mock
private AppService appService;
@Mock
private AdminService adminService;
@Before
public void setUp() {
appController = new AppController(appService, adminService);
}
@Test(expected = NotFoundException.class)
public void testFindNotExists() {
when(appService.findOne(any(String.class))).thenReturn(null);
appController.get("unexist");
}
@Test(expected = NotFoundException.class)
public void testDeleteNotExists() {
when(appService.findOne(any(String.class))).thenReturn(null);
appController.delete("unexist", null);
}
@Test
public void testFindEmpty() {
when(appService.findAll(any(Pageable.class))).thenReturn(new ArrayList<>());
Pageable pageable = PageRequest.of(0, 10);
List<AppDTO> appDTOs = appController.find(null, pageable);
Assert.assertNotNull(appDTOs);
Assert.assertEquals(0, appDTOs.size());
appDTOs = appController.find("", pageable);
Assert.assertNotNull(appDTOs);
Assert.assertEquals(0, appDTOs.size());
}
@Test
public void testFindByName() {
Pageable pageable = PageRequest.of(0, 10);
List<AppDTO> appDTOs = appController.find("unexist", pageable);
Assert.assertNotNull(appDTOs);
Assert.assertEquals(0, appDTOs.size());
}
@Test(expected = ServiceException.class)
public void createFailed() {
AppDTO dto = generateSampleDTOData();
when(appService.findOne(any(String.class))).thenReturn(null);
when(adminService.createNewApp(any(App.class)))
.thenThrow(new ServiceException("create app failed"));
appController.create(dto);
}
private AppDTO generateSampleDTOData() {
AppDTO dto = new AppDTO();
dto.setAppId("someAppId");
dto.setName("someName");
dto.setOwnerName("someOwner");
dto.setOwnerEmail("someOwner@ctrip.com");
dto.setDataChangeLastModifiedBy("test");
dto.setDataChangeCreatedBy("test");
return dto;
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.adminservice.controller;
import com.ctrip.framework.apollo.biz.service.AdminService;
import com.ctrip.framework.apollo.biz.service.AppService;
import com.ctrip.framework.apollo.common.dto.AppDTO;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.common.exception.NotFoundException;
import com.ctrip.framework.apollo.common.exception.ServiceException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import java.util.ArrayList;
import java.util.List;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class ControllerExceptionTest {
private AppController appController;
@Mock
private AppService appService;
@Mock
private AdminService adminService;
@Before
public void setUp() {
appController = new AppController(appService, adminService);
}
@Test(expected = NotFoundException.class)
public void testFindNotExists() {
when(appService.findOne(any(String.class))).thenReturn(null);
appController.get("unexist");
}
@Test(expected = NotFoundException.class)
public void testDeleteNotExists() {
when(appService.findOne(any(String.class))).thenReturn(null);
appController.delete("unexist", null);
}
@Test
public void testFindEmpty() {
when(appService.findAll(any(Pageable.class))).thenReturn(new ArrayList<>());
Pageable pageable = PageRequest.of(0, 10);
List<AppDTO> appDTOs = appController.find(null, pageable);
Assert.assertNotNull(appDTOs);
Assert.assertEquals(0, appDTOs.size());
appDTOs = appController.find("", pageable);
Assert.assertNotNull(appDTOs);
Assert.assertEquals(0, appDTOs.size());
}
@Test
public void testFindByName() {
Pageable pageable = PageRequest.of(0, 10);
List<AppDTO> appDTOs = appController.find("unexist", pageable);
Assert.assertNotNull(appDTOs);
Assert.assertEquals(0, appDTOs.size());
}
@Test(expected = ServiceException.class)
public void createFailed() {
AppDTO dto = generateSampleDTOData();
when(appService.findOne(any(String.class))).thenReturn(null);
when(adminService.createNewApp(any(App.class)))
.thenThrow(new ServiceException("create app failed"));
appController.create(dto);
}
private AppDTO generateSampleDTOData() {
AppDTO dto = new AppDTO();
dto.setAppId("someAppId");
dto.setName("someName");
dto.setOwnerName("someOwner");
dto.setOwnerEmail("someOwner@ctrip.com");
dto.setDataChangeLastModifiedBy("test");
dto.setDataChangeCreatedBy("test");
return dto;
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./scripts/apollo-on-kubernetes/kubernetes/apollo-env-dev/service-mysql-for-apollo-dev-env.yaml | #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
# 为外部 mysql 服务设置 service
kind: Service
apiVersion: v1
metadata:
namespace: sre
name: service-mysql-for-apollo-dev-env
labels:
app: service-mysql-for-apollo-dev-env
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
type: ClusterIP
sessionAffinity: None
---
kind: Endpoints
apiVersion: v1
metadata:
namespace: sre
name: service-mysql-for-apollo-dev-env
subsets:
- addresses:
- ip: your-mysql-addresses
ports:
- protocol: TCP
port: 3306
| #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
# 为外部 mysql 服务设置 service
kind: Service
apiVersion: v1
metadata:
namespace: sre
name: service-mysql-for-apollo-dev-env
labels:
app: service-mysql-for-apollo-dev-env
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
type: ClusterIP
sessionAffinity: None
---
kind: Endpoints
apiVersion: v1
metadata:
namespace: sre
name: service-mysql-for-apollo-dev-env
subsets:
- addresses:
- ip: your-mysql-addresses
ports:
- protocol: TCP
port: 3306
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/views/component/confirm-dialog.html | <div class="modal fade" id="{{dialogId}}" tabindex="-1" role="dialog">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header panel-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">{{title}}</h4>
</div>
<div class="modal-body {{extraClass}}" ng-bind-html="detailAsHtml">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"
ng-show="showCancelBtn" ng-click="cancel()">{{'Common.Cancel' | translate }}</button>
<button type="button" class="btn btn-danger" data-dismiss="modal"
ng-click="confirm()">
{{confirmBtnText}}
</button>
</div>
</div>
</div>
</div>
| <div class="modal fade" id="{{dialogId}}" tabindex="-1" role="dialog">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header panel-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">{{title}}</h4>
</div>
<div class="modal-body {{extraClass}}" ng-bind-html="detailAsHtml">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"
ng-show="showCancelBtn" ng-click="cancel()">{{'Common.Cancel' | translate }}</button>
<button type="button" class="btn btn-danger" data-dismiss="modal"
ng-click="confirm()">
{{confirmBtnText}}
</button>
</div>
</div>
</div>
</div>
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./scripts/sql/delta/v151-v160/apolloconfigdb-v151-v160.sql | --
-- Copyright 2021 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
# delta schema to upgrade apollo config db from v1.5.1 to v1.6.0
Use ApolloConfigDB;
CREATE TABLE `AccessKey` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret',
`IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀',
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; | --
-- Copyright 2021 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
# delta schema to upgrade apollo config db from v1.5.1 to v1.6.0
Use ApolloConfigDB;
CREATE TABLE `AccessKey` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret',
`IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀',
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; | -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-common/src/test/java/com/ctrip/framework/apollo/common/utils/InputValidatorTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.common.utils;
import static org.junit.Assert.*;
import org.junit.Test;
public class InputValidatorTest {
@Test
public void testValidClusterName() throws Exception {
checkClusterName("some.cluster-_name.123", true);
checkClusterName("some.cluster-_name.123.yml", true);
checkClusterName("some.&.name", false);
checkClusterName("", false);
checkClusterName(null, false);
}
@Test
public void testValidAppNamespaceName() throws Exception {
checkAppNamespaceName("some.cluster-_name.123", true);
checkAppNamespaceName("some.&.name", false);
checkAppNamespaceName("", false);
checkAppNamespaceName(null, false);
checkAppNamespaceName("some.name.json", false);
checkAppNamespaceName("some.name.yml", false);
checkAppNamespaceName("some.name.yaml", false);
checkAppNamespaceName("some.name.xml", false);
checkAppNamespaceName("some.name.properties", false);
}
private void checkClusterName(String name, boolean valid) {
assertEquals(valid, InputValidator.isValidClusterNamespace(name));
}
private void checkAppNamespaceName(String name, boolean valid) {
assertEquals(valid, InputValidator.isValidAppNamespace(name));
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.common.utils;
import static org.junit.Assert.*;
import org.junit.Test;
public class InputValidatorTest {
@Test
public void testValidClusterName() throws Exception {
checkClusterName("some.cluster-_name.123", true);
checkClusterName("some.cluster-_name.123.yml", true);
checkClusterName("some.&.name", false);
checkClusterName("", false);
checkClusterName(null, false);
}
@Test
public void testValidAppNamespaceName() throws Exception {
checkAppNamespaceName("some.cluster-_name.123", true);
checkAppNamespaceName("some.&.name", false);
checkAppNamespaceName("", false);
checkAppNamespaceName(null, false);
checkAppNamespaceName("some.name.json", false);
checkAppNamespaceName("some.name.yml", false);
checkAppNamespaceName("some.name.yaml", false);
checkAppNamespaceName("some.name.xml", false);
checkAppNamespaceName("some.name.properties", false);
}
private void checkClusterName(String name, boolean valid) {
assertEquals(valid, InputValidator.isValidClusterNamespace(name));
}
private void checkAppNamespaceName(String name, boolean valid) {
assertEquals(valid, InputValidator.isValidAppNamespace(name));
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-common/src/main/java/com/ctrip/framework/apollo/common/dto/GrayReleaseRuleItemDTO.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.common.dto;
import com.google.common.collect.Sets;
import java.util.Set;
import static com.google.common.base.MoreObjects.toStringHelper;
/**
* @author Jason Song(song_s@ctrip.com)
*/
public class GrayReleaseRuleItemDTO {
public static final String ALL_IP = "*";
private String clientAppId;
private Set<String> clientIpList;
public GrayReleaseRuleItemDTO(String clientAppId) {
this(clientAppId, Sets.newHashSet());
}
public GrayReleaseRuleItemDTO(String clientAppId, Set<String> clientIpList) {
this.clientAppId = clientAppId;
this.clientIpList = clientIpList;
}
public String getClientAppId() {
return clientAppId;
}
public Set<String> getClientIpList() {
return clientIpList;
}
public boolean matches(String clientAppId, String clientIp) {
return appIdMatches(clientAppId) && ipMatches(clientIp);
}
private boolean appIdMatches(String clientAppId) {
return this.clientAppId.equalsIgnoreCase(clientAppId);
}
private boolean ipMatches(String clientIp) {
return this.clientIpList.contains(ALL_IP) || clientIpList.contains(clientIp);
}
@Override
public String toString() {
return toStringHelper(this).add("clientAppId", clientAppId)
.add("clientIpList", clientIpList).toString();
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.common.dto;
import com.google.common.collect.Sets;
import java.util.Set;
import static com.google.common.base.MoreObjects.toStringHelper;
/**
* @author Jason Song(song_s@ctrip.com)
*/
public class GrayReleaseRuleItemDTO {
public static final String ALL_IP = "*";
private String clientAppId;
private Set<String> clientIpList;
public GrayReleaseRuleItemDTO(String clientAppId) {
this(clientAppId, Sets.newHashSet());
}
public GrayReleaseRuleItemDTO(String clientAppId, Set<String> clientIpList) {
this.clientAppId = clientAppId;
this.clientIpList = clientIpList;
}
public String getClientAppId() {
return clientAppId;
}
public Set<String> getClientIpList() {
return clientIpList;
}
public boolean matches(String clientAppId, String clientIp) {
return appIdMatches(clientAppId) && ipMatches(clientIp);
}
private boolean appIdMatches(String clientAppId) {
return this.clientAppId.equalsIgnoreCase(clientAppId);
}
private boolean ipMatches(String clientIp) {
return this.clientIpList.contains(ALL_IP) || clientIpList.contains(clientIp);
}
@Override
public String toString() {
return toStringHelper(this).add("clientAppId", clientAppId)
.add("clientIpList", clientIpList).toString();
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/zh/community/thank-you.md | # 致谢
<hr />
<img src="en/images/community/jetbrains.svg" alt="jetbrains" style="height: 80px; margin-right: 20px">
<img src="en/images/community/intellij-idea.svg" alt="intellij-idea" style="width: 75px" >
Apollo 团队使用 [IntelliJ IDEA](https://www.jetbrains.com/idea/) 开发开源项目,非常感谢 [JetBrains](https://www.jetbrains.com/) 赞助许可证。
<hr />
<img src="en/images/community/docsify.svg" alt="docsify" style="height: 80px">
Apollo 团队使用 [docsify](https://docsify.js.org/) 生成文档站点。 | # 致谢
<hr />
<img src="en/images/community/jetbrains.svg" alt="jetbrains" style="height: 80px; margin-right: 20px">
<img src="en/images/community/intellij-idea.svg" alt="intellij-idea" style="width: 75px" >
Apollo 团队使用 [IntelliJ IDEA](https://www.jetbrains.com/idea/) 开发开源项目,非常感谢 [JetBrains](https://www.jetbrains.com/) 赞助许可证。
<hr />
<img src="en/images/community/docsify.svg" alt="docsify" style="height: 80px">
Apollo 团队使用 [docsify](https://docsify.js.org/) 生成文档站点。 | -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-common/pom.xml | <?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apollo-common</artifactId>
<name>Apollo Common</name>
<properties>
<github.path>${project.artifactId}</github.path>
</properties>
<dependencies>
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- logback dependencies-->
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<!-- Micrometer core dependecy -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
</project>
| <?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apollo-common</artifactId>
<name>Apollo Common</name>
<properties>
<github.path>${project.artifactId}</github.path>
</properties>
<dependencies>
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- logback dependencies-->
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<!-- Micrometer core dependecy -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
</project>
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-openapi/src/main/java/com/ctrip/framework/apollo/openapi/dto/NamespaceGrayDelReleaseDTO.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.openapi.dto;
import java.util.Set;
public class NamespaceGrayDelReleaseDTO extends NamespaceReleaseDTO {
private Set<String> grayDelKeys;
public Set<String> getGrayDelKeys() {
return grayDelKeys;
}
public void setGrayDelKeys(Set<String> grayDelKeys) {
this.grayDelKeys = grayDelKeys;
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.openapi.dto;
import java.util.Set;
public class NamespaceGrayDelReleaseDTO extends NamespaceReleaseDTO {
private Set<String> grayDelKeys;
public Set<String> getGrayDelKeys() {
return grayDelKeys;
}
public void setGrayDelKeys(Set<String> grayDelKeys) {
this.grayDelKeys = grayDelKeys;
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-client/src/test/resources/spring/yaml/case2.yml | #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
batch: 2000
| #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
batch: 2000
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-demo/src/main/resources/application.yml | #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apollo:
bootstrap:
enabled: true
eagerLoad:
enabled: true
# will inject 'application' and 'TEST1.apollo' namespaces in bootstrap phase
namespaces: application,TEST1.apollo,application.yaml
| #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apollo:
bootstrap:
enabled: true
eagerLoad:
enabled: true
# will inject 'application' and 'TEST1.apollo' namespaces in bootstrap phase
namespaces: application,TEST1.apollo,application.yaml
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/ApolloThreadFactory.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.core.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
public class ApolloThreadFactory implements ThreadFactory {
private static Logger log = LoggerFactory.getLogger(ApolloThreadFactory.class);
private final AtomicLong threadNumber = new AtomicLong(1);
private final String namePrefix;
private final boolean daemon;
private static final ThreadGroup threadGroup = new ThreadGroup("Apollo");
public static ThreadGroup getThreadGroup() {
return threadGroup;
}
public static ThreadFactory create(String namePrefix, boolean daemon) {
return new ApolloThreadFactory(namePrefix, daemon);
}
public static boolean waitAllShutdown(int timeoutInMillis) {
ThreadGroup group = getThreadGroup();
Thread[] activeThreads = new Thread[group.activeCount()];
group.enumerate(activeThreads);
Set<Thread> alives = new HashSet<>(Arrays.asList(activeThreads));
Set<Thread> dies = new HashSet<>();
log.info("Current ACTIVE thread count is: {}", alives.size());
long expire = System.currentTimeMillis() + timeoutInMillis;
while (System.currentTimeMillis() < expire) {
classify(alives, dies, new ClassifyStandard<Thread>() {
@Override
public boolean satisfy(Thread thread) {
return !thread.isAlive() || thread.isInterrupted() || thread.isDaemon();
}
});
if (alives.size() > 0) {
log.info("Alive apollo threads: {}", alives);
try {
TimeUnit.SECONDS.sleep(2);
} catch (InterruptedException ex) {
// ignore
}
} else {
log.info("All apollo threads are shutdown.");
return true;
}
}
log.warn("Some apollo threads are still alive but expire time has reached, alive threads: {}",
alives);
return false;
}
private interface ClassifyStandard<T> {
boolean satisfy(T thread);
}
private static <T> void classify(Set<T> src, Set<T> des, ClassifyStandard<T> standard) {
Set<T> set = new HashSet<>();
for (T t : src) {
if (standard.satisfy(t)) {
set.add(t);
}
}
src.removeAll(set);
des.addAll(set);
}
private ApolloThreadFactory(String namePrefix, boolean daemon) {
this.namePrefix = namePrefix;
this.daemon = daemon;
}
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(threadGroup, runnable,//
threadGroup.getName() + "-" + namePrefix + "-" + threadNumber.getAndIncrement());
thread.setDaemon(daemon);
if (thread.getPriority() != Thread.NORM_PRIORITY) {
thread.setPriority(Thread.NORM_PRIORITY);
}
return thread;
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.core.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
public class ApolloThreadFactory implements ThreadFactory {
private static Logger log = LoggerFactory.getLogger(ApolloThreadFactory.class);
private final AtomicLong threadNumber = new AtomicLong(1);
private final String namePrefix;
private final boolean daemon;
private static final ThreadGroup threadGroup = new ThreadGroup("Apollo");
public static ThreadGroup getThreadGroup() {
return threadGroup;
}
public static ThreadFactory create(String namePrefix, boolean daemon) {
return new ApolloThreadFactory(namePrefix, daemon);
}
public static boolean waitAllShutdown(int timeoutInMillis) {
ThreadGroup group = getThreadGroup();
Thread[] activeThreads = new Thread[group.activeCount()];
group.enumerate(activeThreads);
Set<Thread> alives = new HashSet<>(Arrays.asList(activeThreads));
Set<Thread> dies = new HashSet<>();
log.info("Current ACTIVE thread count is: {}", alives.size());
long expire = System.currentTimeMillis() + timeoutInMillis;
while (System.currentTimeMillis() < expire) {
classify(alives, dies, new ClassifyStandard<Thread>() {
@Override
public boolean satisfy(Thread thread) {
return !thread.isAlive() || thread.isInterrupted() || thread.isDaemon();
}
});
if (alives.size() > 0) {
log.info("Alive apollo threads: {}", alives);
try {
TimeUnit.SECONDS.sleep(2);
} catch (InterruptedException ex) {
// ignore
}
} else {
log.info("All apollo threads are shutdown.");
return true;
}
}
log.warn("Some apollo threads are still alive but expire time has reached, alive threads: {}",
alives);
return false;
}
private interface ClassifyStandard<T> {
boolean satisfy(T thread);
}
private static <T> void classify(Set<T> src, Set<T> des, ClassifyStandard<T> standard) {
Set<T> set = new HashSet<>();
for (T t : src) {
if (standard.satisfy(t)) {
set.add(t);
}
}
src.removeAll(set);
des.addAll(set);
}
private ApolloThreadFactory(String namePrefix, boolean daemon) {
this.namePrefix = namePrefix;
this.daemon = daemon;
}
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(threadGroup, runnable,//
threadGroup.getName() + "-" + namePrefix + "-" + threadNumber.getAndIncrement());
thread.setDaemon(daemon);
if (thread.getPriority() != Thread.NORM_PRIORITY) {
thread.setPriority(Thread.NORM_PRIORITY);
}
return thread;
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ReleaseHistoryController.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.component.PermissionValidator;
import com.ctrip.framework.apollo.portal.entity.bo.ReleaseHistoryBO;
import com.ctrip.framework.apollo.portal.service.ReleaseHistoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collections;
import java.util.List;
@RestController
public class ReleaseHistoryController {
private final ReleaseHistoryService releaseHistoryService;
private final PermissionValidator permissionValidator;
public ReleaseHistoryController(final ReleaseHistoryService releaseHistoryService, final PermissionValidator permissionValidator) {
this.releaseHistoryService = releaseHistoryService;
this.permissionValidator = permissionValidator;
}
@GetMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories")
public List<ReleaseHistoryBO> findReleaseHistoriesByNamespace(@PathVariable String appId,
@PathVariable String env,
@PathVariable String clusterName,
@PathVariable String namespaceName,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "size", defaultValue = "10") int size) {
if (permissionValidator.shouldHideConfigToCurrentUser(appId, env, namespaceName)) {
return Collections.emptyList();
}
return releaseHistoryService.findNamespaceReleaseHistory(appId, Env.valueOf(env), clusterName ,namespaceName, page, size);
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.component.PermissionValidator;
import com.ctrip.framework.apollo.portal.entity.bo.ReleaseHistoryBO;
import com.ctrip.framework.apollo.portal.service.ReleaseHistoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collections;
import java.util.List;
@RestController
public class ReleaseHistoryController {
private final ReleaseHistoryService releaseHistoryService;
private final PermissionValidator permissionValidator;
public ReleaseHistoryController(final ReleaseHistoryService releaseHistoryService, final PermissionValidator permissionValidator) {
this.releaseHistoryService = releaseHistoryService;
this.permissionValidator = permissionValidator;
}
@GetMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories")
public List<ReleaseHistoryBO> findReleaseHistoriesByNamespace(@PathVariable String appId,
@PathVariable String env,
@PathVariable String clusterName,
@PathVariable String namespaceName,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "size", defaultValue = "10") int size) {
if (permissionValidator.shouldHideConfigToCurrentUser(appId, env, namespaceName)) {
return Collections.emptyList();
}
return releaseHistoryService.findNamespaceReleaseHistory(appId, Env.valueOf(env), clusterName ,namespaceName, page, size);
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-core/src/test/java/com/ctrip/framework/foundation/FoundationTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.foundation;
import static org.junit.Assert.assertTrue;
import com.ctrip.framework.foundation.Foundation;
import com.ctrip.framework.foundation.internals.provider.DefaultApplicationProvider;
import com.ctrip.framework.foundation.internals.provider.DefaultServerProvider;
import org.junit.Assert;
import org.junit.Test;
public class FoundationTest {
@Test
public void testApp() {
assertTrue(Foundation.app() instanceof DefaultApplicationProvider);
}
@Test
public void testServer() {
assertTrue(Foundation.server() instanceof DefaultServerProvider);
}
@Test
public void testNet() {
// 获取本机IP和HostName
String hostAddress = Foundation.net().getHostAddress();
String hostName = Foundation.net().getHostName();
Assert.assertNotNull("No host address detected.", hostAddress);
Assert.assertNotNull("No host name resolved.", hostName);
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.foundation;
import static org.junit.Assert.assertTrue;
import com.ctrip.framework.foundation.Foundation;
import com.ctrip.framework.foundation.internals.provider.DefaultApplicationProvider;
import com.ctrip.framework.foundation.internals.provider.DefaultServerProvider;
import org.junit.Assert;
import org.junit.Test;
public class FoundationTest {
@Test
public void testApp() {
assertTrue(Foundation.app() instanceof DefaultApplicationProvider);
}
@Test
public void testServer() {
assertTrue(Foundation.server() instanceof DefaultServerProvider);
}
@Test
public void testNet() {
// 获取本机IP和HostName
String hostAddress = Foundation.net().getHostAddress();
String hostName = Foundation.net().getHostName();
Assert.assertNotNull("No host address detected.", hostAddress);
Assert.assertNotNull("No host name resolved.", hostName);
}
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-client/src/test/resources/yaml/case4.yaml | #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
--- # document start
# Comments in YAML look like this.
################
# SCALAR TYPES #
################
# Our root object (which continues for the entire document) will be a map,
# which is equivalent to a dictionary, hash or object in other languages.
key: value
another_key: Another value goes here.
a_number_value: 100
scientific_notation: 1e+12
# The number 1 will be interpreted as a number, not a boolean. if you want
# it to be interpreted as a boolean, use true
boolean: true
null_value: null
key with spaces: value
# Notice that strings don't need to be quoted. However, they can be.
however: 'A string, enclosed in quotes.'
'Keys can be quoted too.': "Useful if you want to put a ':' in your key."
single quotes: 'have ''one'' escape pattern'
double quotes: "have many: \", \0, \t, \u263A, \x0d\x0a == \r\n, and more."
# Multiple-line strings can be written either as a 'literal block' (using |),
# or a 'folded block' (using '>').
literal_block: |
This entire block of text will be the value of the 'literal_block' key,
with line breaks being preserved.
The literal continues until de-dented, and the leading indentation is
stripped.
Any lines that are 'more-indented' keep the rest of their indentation -
these lines will be indented by 4 spaces.
folded_style: >
This entire block of text will be the value of 'folded_style', but this
time, all newlines will be replaced with a single space.
Blank lines, like above, are converted to a newline character.
'More-indented' lines keep their newlines, too -
this text will appear over two lines.
####################
# COLLECTION TYPES #
####################
# Nesting uses indentation. 2 space indent is preferred (but not required).
a_nested_map:
key: value
another_key: Another Value
another_nested_map:
hello: hello
# Maps don't have to have string keys.
0.25: a float key
# Keys can also be complex, like multi-line objects
# We use ? followed by a space to indicate the start of a complex key.
? |
This is a key
that has multiple lines
: and this is its value
# YAML also allows mapping between sequences with the complex key syntax
# Some language parsers might complain
# An example
? - Manchester United
- Real Madrid
: [2001-01-01, 2002-02-02]
# Sequences (equivalent to lists or arrays) look like this
# (note that the '-' counts as indentation):
a_sequence:
- Item 1
- Item 2
- 0.5 # sequences can contain disparate types.
- Item 4
- key: value
another_key: another_value
-
- This is a sequence
- inside another sequence
- - - Nested sequence indicators
- can be collapsed
# Since YAML is a superset of JSON, you can also write JSON-style maps and
# sequences:
json_map: {"key": "value"}
json_seq: [3, 2, 1, "takeoff"]
and quotes are optional: {key: [3, 2, 1, takeoff]}
#######################
# EXTRA YAML FEATURES #
#######################
# YAML also has a handy feature called 'anchors', which let you easily duplicate
# content across your document. Both of these keys will have the same value:
anchored_content: &anchor_name This string will appear as the value of two keys.
other_anchor: *anchor_name
# Anchors can be used to duplicate/inherit properties
base: &base
name: Everyone has same name
# The regexp << is called Merge Key Language-Independent Type. It is used to
# indicate that all the keys of one or more specified maps should be inserted
# into the current map.
foo: &foo
<<: *base
age: 10
bar: &bar
<<: *base
age: 20
# foo and bar would also have name: Everyone has same name
# YAML also has tags, which you can use to explicitly declare types.
explicit_string: !!str 0.5
####################
# EXTRA YAML TYPES #
####################
# Strings and numbers aren't the only scalars that YAML can understand.
# ISO-formatted date and datetime literals are also parsed.
datetime: 2001-12-15T02:59:43.1Z
datetime_with_spaces: 2001-12-14 21:59:43.10 -5
date: 2002-12-14
# YAML also has a set type, which looks like this:
set:
? item1
? item2
? item3
or: {item1, item2, item3}
# Sets are just maps with null values; the above is equivalent to:
set2:
item1: null
item2: null
item3: null
... # document end
| #
# Copyright 2021 Apollo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
--- # document start
# Comments in YAML look like this.
################
# SCALAR TYPES #
################
# Our root object (which continues for the entire document) will be a map,
# which is equivalent to a dictionary, hash or object in other languages.
key: value
another_key: Another value goes here.
a_number_value: 100
scientific_notation: 1e+12
# The number 1 will be interpreted as a number, not a boolean. if you want
# it to be interpreted as a boolean, use true
boolean: true
null_value: null
key with spaces: value
# Notice that strings don't need to be quoted. However, they can be.
however: 'A string, enclosed in quotes.'
'Keys can be quoted too.': "Useful if you want to put a ':' in your key."
single quotes: 'have ''one'' escape pattern'
double quotes: "have many: \", \0, \t, \u263A, \x0d\x0a == \r\n, and more."
# Multiple-line strings can be written either as a 'literal block' (using |),
# or a 'folded block' (using '>').
literal_block: |
This entire block of text will be the value of the 'literal_block' key,
with line breaks being preserved.
The literal continues until de-dented, and the leading indentation is
stripped.
Any lines that are 'more-indented' keep the rest of their indentation -
these lines will be indented by 4 spaces.
folded_style: >
This entire block of text will be the value of 'folded_style', but this
time, all newlines will be replaced with a single space.
Blank lines, like above, are converted to a newline character.
'More-indented' lines keep their newlines, too -
this text will appear over two lines.
####################
# COLLECTION TYPES #
####################
# Nesting uses indentation. 2 space indent is preferred (but not required).
a_nested_map:
key: value
another_key: Another Value
another_nested_map:
hello: hello
# Maps don't have to have string keys.
0.25: a float key
# Keys can also be complex, like multi-line objects
# We use ? followed by a space to indicate the start of a complex key.
? |
This is a key
that has multiple lines
: and this is its value
# YAML also allows mapping between sequences with the complex key syntax
# Some language parsers might complain
# An example
? - Manchester United
- Real Madrid
: [2001-01-01, 2002-02-02]
# Sequences (equivalent to lists or arrays) look like this
# (note that the '-' counts as indentation):
a_sequence:
- Item 1
- Item 2
- 0.5 # sequences can contain disparate types.
- Item 4
- key: value
another_key: another_value
-
- This is a sequence
- inside another sequence
- - - Nested sequence indicators
- can be collapsed
# Since YAML is a superset of JSON, you can also write JSON-style maps and
# sequences:
json_map: {"key": "value"}
json_seq: [3, 2, 1, "takeoff"]
and quotes are optional: {key: [3, 2, 1, takeoff]}
#######################
# EXTRA YAML FEATURES #
#######################
# YAML also has a handy feature called 'anchors', which let you easily duplicate
# content across your document. Both of these keys will have the same value:
anchored_content: &anchor_name This string will appear as the value of two keys.
other_anchor: *anchor_name
# Anchors can be used to duplicate/inherit properties
base: &base
name: Everyone has same name
# The regexp << is called Merge Key Language-Independent Type. It is used to
# indicate that all the keys of one or more specified maps should be inserted
# into the current map.
foo: &foo
<<: *base
age: 10
bar: &bar
<<: *base
age: 20
# foo and bar would also have name: Everyone has same name
# YAML also has tags, which you can use to explicitly declare types.
explicit_string: !!str 0.5
####################
# EXTRA YAML TYPES #
####################
# Strings and numbers aren't the only scalars that YAML can understand.
# ISO-formatted date and datetime literals are also parsed.
datetime: 2001-12-15T02:59:43.1Z
datetime_with_spaces: 2001-12-14 21:59:43.10 -5
date: 2002-12-14
# YAML also has a set type, which looks like this:
set:
? item1
? item2
? item3
or: {item1, item2, item3}
# Sets are just maps with null values; the above is equivalent to:
set2:
item1: null
item2: null
item3: null
... # document end
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-biz/src/test/resources/data.sql | --
-- Copyright 2021 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'fx.apollo.config', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'fx.apollo.admin', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'fx.apollo.portal', true);
INSERT INTO AppNamespace (AppID, Name, IsPublic) VALUES ('fxhermesproducer', 'fx.hermes.producer', true);
| --
-- Copyright 2021 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'fx.apollo.config', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'fx.apollo.admin', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'fx.apollo.portal', true);
INSERT INTO AppNamespace (AppID, Name, IsPublic) VALUES ('fxhermesproducer', 'fx.hermes.producer', true);
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-core/src/test/resources/META-INF/services/com.ctrip.framework.foundation.internals.ServiceBootstrapTest$Interface3 | -1 | ||
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/scripts/services/SystemInfoService.js | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
appService.service('SystemInfoService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var system_info_resource = $resource('', {}, {
load_system_info: {
method: 'GET',
url: AppUtil.prefixPath() + '/system-info'
},
check_health: {
method: 'GET',
url: AppUtil.prefixPath() + '/system-info/health'
}
});
return {
load_system_info: function () {
var d = $q.defer();
system_info_resource.load_system_info({},
function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
},
check_health: function (instanceId, host) {
var d = $q.defer();
system_info_resource.check_health({
instanceId: instanceId
},
function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
}
}]);
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
appService.service('SystemInfoService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var system_info_resource = $resource('', {}, {
load_system_info: {
method: 'GET',
url: AppUtil.prefixPath() + '/system-info'
},
check_health: {
method: 'GET',
url: AppUtil.prefixPath() + '/system-info/health'
}
});
return {
load_system_info: function () {
var d = $q.defer();
system_info_resource.load_system_info({},
function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
},
check_health: function (instanceId, host) {
var d = $q.defer();
system_info_resource.check_health({
instanceId: instanceId
},
function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
}
}]);
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/repository/RoleRepository.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.repository;
import com.ctrip.framework.apollo.portal.entity.po.Role;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
* @author Jason Song(song_s@ctrip.com)
*/
public interface RoleRepository extends PagingAndSortingRepository<Role, Long> {
/**
* find role by role name
*/
Role findTopByRoleName(String roleName);
@Query("SELECT r.id from Role r where (r.roleName = CONCAT('Master+', ?1) "
+ "OR r.roleName like CONCAT('ModifyNamespace+', ?1, '+%') "
+ "OR r.roleName like CONCAT('ReleaseNamespace+', ?1, '+%') "
+ "OR r.roleName = CONCAT('ManageAppMaster+', ?1))")
List<Long> findRoleIdsByAppId(String appId);
@Query("SELECT r.id from Role r where (r.roleName = CONCAT('ModifyNamespace+', ?1, '+', ?2) "
+ "OR r.roleName = CONCAT('ReleaseNamespace+', ?1, '+', ?2))")
List<Long> findRoleIdsByAppIdAndNamespace(String appId, String namespaceName);
@Modifying
@Query("UPDATE Role SET IsDeleted=1, DataChange_LastModifiedBy = ?2 WHERE Id in ?1")
Integer batchDelete(List<Long> roleIds, String operator);
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.repository;
import com.ctrip.framework.apollo.portal.entity.po.Role;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
* @author Jason Song(song_s@ctrip.com)
*/
public interface RoleRepository extends PagingAndSortingRepository<Role, Long> {
/**
* find role by role name
*/
Role findTopByRoleName(String roleName);
@Query("SELECT r.id from Role r where (r.roleName = CONCAT('Master+', ?1) "
+ "OR r.roleName like CONCAT('ModifyNamespace+', ?1, '+%') "
+ "OR r.roleName like CONCAT('ReleaseNamespace+', ?1, '+%') "
+ "OR r.roleName = CONCAT('ManageAppMaster+', ?1))")
List<Long> findRoleIdsByAppId(String appId);
@Query("SELECT r.id from Role r where (r.roleName = CONCAT('ModifyNamespace+', ?1, '+', ?2) "
+ "OR r.roleName = CONCAT('ReleaseNamespace+', ?1, '+', ?2))")
List<Long> findRoleIdsByAppIdAndNamespace(String appId, String namespaceName);
@Modifying
@Query("UPDATE Role SET IsDeleted=1, DataChange_LastModifiedBy = ?2 WHERE Id in ?1")
Integer batchDelete(List<Long> roleIds, String operator);
}
| -1 |
apolloconfig/apollo | 3,816 | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| Shawyeok | 2021-07-08T09:46:00Z | 2021-07-19T13:19:40Z | 622e35a199d979e3cc6913c79c53e92491f5bd2e | 6d50ca881a6afb2766725bdb3c09c14d450cc12f | Reduce bootstrap time in the situation with large properties. ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms | 567ms
| 11482ms | 627ms
| 11903ms | 611ms
Stdev | 622ms | 30ms
Aveage | 12141ms | 610ms
## Which issue(s) this PR fixes:
Fixes #3800
## Brief changelog
Reduce bootstrap time in the situation with large properties.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./doc/images/app-permission-entry.png | PNG
IHDR g O 9MsJ
iCCPICC Profile HT̤ZBޑN 5A: %A
(""X**EւX-
,
Xxyߜo|on= G(Le Hd\QLS 4n%017=>EqxZ!ˋM K禠|3\( M:C8(Eh(YY=3'$
Q G =ZgfrQ
eS/@eGnr>F))|eщfDÉ.Ld#%Y<
4) " tdkV+aA̒9fp;tnQsα8)e9g9IK$l Ǧ{qߓ=9 !s[2Is$u8HsS)q9H!B/CRJ3\%$`ɳDONd}; ~X3@Flnl?>!邞X&[51b >{3gbkBTݷH|-F vt_(kZu HG Ж2gkгM@h=`vf
3ڱ ! \ RkFP 6Tԃ#h9p \}xx 0 AB4HR!CbAAP4 1AP%tj~NB+P?tƠ)0VuE0v}x9p>p|߁2@c!HH!RT#H'҃BWgC01{7&Ťac1zLf3bX;,Ǯ`˱VEctq68o\$.Wۋkuqø <7;| ?D OBA@# g7 D6ю@%CN
q$K%9BH
R3"L ے\r(2y"G1QSĔ:J>Jա:Sԭy')['AJMkiJr7_etdd82edNLdddSdeeȎt<xrr5riMF6.F8.MOя{raYUCf$3Jw_,pY`˂7|TXPТpG"SC1Iqbc%RJ.*ZH_hp᱅ae 55ו'TTUT*UΫRe:&QS9Ϊ`3]
渺XzFFFcM&K3NL[s\KM_kVm6K;A{vG]p::
l&GzT='4j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