totalo commented on a change in pull request #15977:
URL: https://github.com/apache/shardingsphere/pull/15977#discussion_r824299815



##########
File path: 
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/instance/InstanceContext.java
##########
@@ -141,13 +144,13 @@ public void deleteComputeNodeInstance(final 
ComputeNodeInstance instance) {
      * @param labels collection of contained label
      * @return compute node instances
      */
-    public Collection<ComputeNodeInstance> getComputeNodeInstances(final 
InstanceType instanceType, final Collection<String> labels) {
-        Collection<ComputeNodeInstance> result = new 
ArrayList<>(computeNodeInstances.size());
-        computeNodeInstances.forEach(each -> {
-            if (each.getInstanceDefinition().getInstanceType() == instanceType 
&& each.getLabels().stream().anyMatch(labels::contains)) {
-                result.add(each);
+    public List<InstanceId> getComputeNodeInstanceIds(final InstanceType 
instanceType, final Collection<String> labels) {

Review comment:
       Get it!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to