Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/768#discussion_r39427372
  
    --- Diff: engine/schema/src/com/cloud/upgrade/dao/Upgrade452to460.java ---
    @@ -60,10 +60,25 @@ public boolean supportsRollingUpgrade() {
     
         @Override
         public void performDataMigration(final Connection conn) {
    +        alterAddColumnToCloudUsage(conn);
             updateVMInstanceUserId(conn);
             addIndexForVMInstance(conn);
         }
     
    +    public void alterAddColumnToCloudUsage(final Connection conn) {
    +        final String alterTableSql = "ALTER TABLE 
`cloud_usage`.`cloud_usage` ADD COLUMN `quota_calculated` tinyint(1) DEFAULT 0 
NOT NULL COMMENT 'quota calculation status'";
    +        try (PreparedStatement pstmt = 
conn.prepareStatement(alterTableSql)) {
    +            pstmt.executeUpdate();
    +            s_logger.debug("Altered usage table and added column 
quota_calculated");
    +        } catch (SQLException e) {
    +            if (e.getMessage().contains("quota_calculated")) {
    +                s_logger.debug("Usage table already has a column called 
quota_calculated");
    --- End diff --
    
    Why don't we log this message to ``INFO`` or ``WARN``?  Thinking through it 
as a sys admin, I would like to know when a migration decided not to perform a 
migration -- help me understand the impact of partial upgrade.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to