Damans227 commented on code in PR #14310:
URL: https://github.com/apache/cloudstack/pull/14310#discussion_r4183793917


##########
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java:
##########
@@ -2055,12 +2064,20 @@ private void updateBackupUsageRecords(final 
BackupProvider backupProvider, DataC
                     Pair<Long, Long> sizes = entry.getValue();
                     Long backupSize = sizes.first();
                     Long protectedSize = sizes.second();
+                    Pair<Long, Long> key = new Pair<>(vm.getId(), offeringId);
+                    Pair<Long, Long> metric = new Pair<>(backupSize, 
protectedSize);
+                    published.put(key, metric);
+                    if (metric.equals(lastPublished.get(key))) {

Review Comment:
   what happens with two management servers if one sends a new size and then 
goes down? if the size goes back after that, the other one still remembers the 
old value and skips it, so billing stays on the wrong size



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