cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <>
Subject [GitHub] cloudstack pull request #873: CLOUDSTACK-8896: allocated percentage of stora...
Date Fri, 02 Dec 2016 05:36:10 GMT
Github user jburwell commented on a diff in the pull request:
    --- Diff: server/src/com/cloud/storage/ ---
    @@ -1746,10 +1747,10 @@ public boolean storagePoolHasEnoughSpace(List<Volume> volumes,
StoragePool pool,
                         allocatedSizeWithTemplate = _capacityMgr.getAllocatedPoolCapacity(poolVO,
    -            if (volumeVO.getState() != Volume.State.Ready) {
    -                totalAskingSize += getDataObjectSizeIncludingHypervisorSnapshotReserve(volumeVO,
    +            // A ready state volume is already allocated in a pool. so the asking size
is zero for it.
    +            // In case the volume is moving across pools or is not ready yet, the asking
size has to be computed
    +            s_logger.debug("pool id for the volume with id: " + volumeVO.getId() + "
is: " + volumeVO.getPoolId());
    --- End diff --
    Please wrap this `DEBUG` log in an `if (s_logger.isDebugEnabled)` check to prevent unnecessary/expensive
string concatenation when `DEBUG` logging is not enabled.
    Minor nit: grammatically, the `:` character after `is` is unnecessary.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message