bernardodemarco commented on code in PR #10419:
URL: https://github.com/apache/cloudstack/pull/10419#discussion_r1976480634


##########
engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java:
##########
@@ -248,15 +237,16 @@ List<StoragePool> 
reorderStoragePoolsBasedOnAlgorithm(List<StoragePool> pools, D
     void reorderRandomPools(List<StoragePool> pools) {
         StorageUtil.traceLogStoragePools(pools, logger, "pools to choose from: 
");
         if (logger.isTraceEnabled()) {
-            logger.trace(String.format("Shuffle this so that we don't check 
the pools in the same order. Algorithm == '%s' (or no account?)", 
allocationAlgorithm));
+            logger.trace("Shuffle this so that we don't check the pools in the 
same order. Algorithm == '[{}]' (or no account?)", allocationAlgorithm);

Review Comment:
   ```suggestion
               logger.trace("Shuffling the list of storage pools, since the 
algorithm is '[{}]' or no account has been specified", allocationAlgorithm);
   ```



##########
engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java:
##########
@@ -270,22 +260,24 @@ private List<StoragePool> 
reorderPoolsByDiskProvisioningType(List<StoragePool> p
                     reorderedPools.add(preferredIndex++, pool);
                 }
             }
+            logger.debug("Reordered list of pools by disk provisioning type 
[{}]: [{}]", diskProfile.getProvisioningType(), pools);
             return reorderedPools;
         } else {
+            logger.debug("Reordering pools by disk provisioning type wasn't 
necessary.");

Review Comment:
   We could specify the reason for the reordering of pools not being necessary 
here



-- 
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