waterWang opened a new pull request, #13924: URL: https://github.com/apache/cloudstack/pull/13924
### Fixes #13921 Two defects corrected in `VMSnapshotUsageParser`: 1. **Wrong snapshot ID label in usage record**: `createUsageRecord()` used the current snapshot's ID (`usageRec.getVmSnapshotId()`) while duration, size, and disk offering came from the previous event. Changed to `previousEvent.getVmSnapshotId()`. 2. **Concurrent snapshot key collision**: The `unprocessedUsage` map keyed entries by `vmId + ":" + volId` only, so concurrent snapshots of the same volume overwrote each other. Added `vmSnapshotId` to the key to distinguish them. ### Root cause From the issue body: > Net effect: the first snapshot's usage is credited to the second snapshot, and the first snapshot stops accruing usage even though it still exists and is Ready. -- 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]
