Skip to content

Conversation

liubao68
Copy link
Contributor

@liubao68 liubao68 commented Aug 4, 2017

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 85.253% when pulling aca63f2 on liubao68:master into 763754e on ServiceComb:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 85.253% when pulling aca63f2 on liubao68:master into 763754e on ServiceComb:master.


@Override
public List<Server> getFilteredListOfServers(List<Server> list) {
List<Server> result = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to create cache for this?
avoid loop and build the list each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not possible here because doing that we have to iterate 'list' to check if it is changed here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if want to use cache, must:
1.the filter must be the first filter
2.when create instance, save the cache reference
3.when getFilteredListOfServers, ask cache if it is changed, if changed, then rebuild zone cache

it's a little complex, if this filter caused a performance problem in the furture, then can use this method to optimize.

headers.add("X-Tenant-Name", "default");

RequestEntity<String> requestEntity = new RequestEntity<String>(headers, HttpMethod.GET,
new URI("http://127.0.0.1:9980/registry/v3/microservices"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be better if we can pass the service center address from the exec argument options.

@WillemJiang WillemJiang merged commit c2accce into apache:master Aug 9, 2017
@WillemJiang WillemJiang modified the milestone: 0.2.0 Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants