DaanHoogland commented on a change in pull request #2314: CLOUDSTACK-10136: Fix
RemoteHostEndPoint thread growth
URL: https://github.com/apache/cloudstack/pull/2314#discussion_r150249968
##########
File path:
engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
##########
@@ -106,16 +106,19 @@ protected EndPoint findEndPointInScope(Scope scope,
String sqlBase, Long poolId)
StringBuilder sbuilder = new StringBuilder();
sbuilder.append(sqlBase);
- if (scope.getScopeType() == ScopeType.HOST) {
- sbuilder.append(" and h.id = ");
- sbuilder.append(scope.getScopeId());
- } else if (scope.getScopeType() == ScopeType.CLUSTER) {
- sbuilder.append(" and h.cluster_id = ");
- sbuilder.append(scope.getScopeId());
- } else if (scope.getScopeType() == ScopeType.ZONE) {
- sbuilder.append(" and h.data_center_id = ");
- sbuilder.append(scope.getScopeId());
+ if (scope != null) {
Review comment:
bug fix 2 :+1:
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services