Repository navigation
Fixes VM snapshot usage records that are attributed to the old snapshot - #14308
Draft
harikrishna-patnala wants to merge 2 commits into
Draft
harikrishna-patnala wants to merge 2 commits into
harikrishna-patnala wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14308 +/- ##
============================================
+ Coverage 18.32% 18.34% +0.01%
- Complexity 16644 16658 +14
============================================
Files 5939 5939
Lines 537787 537785 -2
Branches 65932 65931 -1
============================================
+ Hits 98544 98630 +86
+ Misses 428033 427942 -91
- Partials 11210 11213 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
harikrishna-patnala
marked this pull request as draft
October 5, 2026 09:21
The parser chained usage_vmsnapshot rows of the same VM/volume as if a newer VM snapshot replaced the older one: the older snapshot was billed only up to the creation of the newer one and then marked processed, so it stopped accruing usage. Keying the map by snapshot id alone also made the older snapshot be billed twice for the overlap within the same period. - Bill every row from max(created, startDate) to min(deleted, endDate), like VMSnapshotOnPrimaryUsageParser does; the parser no longer writes the processed column, which is now only set by the delete event. - Include rows deleted during the period in getUsageRecords, so the last partial period before deletion is billed. - On VM snapshot delete, only close the rows of the deleted snapshot/volume instead of all snapshot rows of the VM (falls back to the old behaviour for legacy events without a vmSnapshotId detail).
harikrishna-patnala
force-pushed
the
vm-snapshot-usage-fix
branch
from
November 12, 2026 06:33
0d25a22 to
e7fe6f9
Compare
Member
Author
|
@blueorangutan package |
|
@harikrishna-patnala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20011 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes #13921
Here we used the right usage record to get the actual snapshot details.
Types of changes
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?