)]}'
{
  "commit": "e7fe6f9fdc7450a1df9360a9283f4ac17420ed40",
  "tree": "bfe348b968dd22fae8813d3f272db81c5fb60528",
  "parents": [
    "f93b45066a328b9a4eb87a8031b1bc90aea81c5a"
  ],
  "author": {
    "name": "Harikrishna Patnala",
    "email": "harikrishna.patnala@gmail.com",
    "time": "Thu Nov 12 05:20:05 2026 +0000"
  },
  "committer": {
    "name": "Harikrishna Patnala",
    "email": "harikrishna.patnala@gmail.com",
    "time": "Thu Nov 12 12:02:46 2026 +0530"
  },
  "message": "Bill each VM snapshot independently in VMSnapshotUsageParser\n\nThe parser chained usage_vmsnapshot rows of the same VM/volume as if a newer\nVM snapshot replaced the older one: the older snapshot was billed only up to\nthe creation of the newer one and then marked processed, so it stopped\naccruing usage. Keying the map by snapshot id alone also made the older\nsnapshot be billed twice for the overlap within the same period.\n\n- Bill every row from max(created, startDate) to min(deleted, endDate),\n  like VMSnapshotOnPrimaryUsageParser does; the parser no longer writes the\n  processed column, which is now only set by the delete event.\n- Include rows deleted during the period in getUsageRecords, so the last\n  partial period before deletion is billed.\n- On VM snapshot delete, only close the rows of the deleted snapshot/volume\n  instead of all snapshot rows of the VM (falls back to the old behaviour\n  for legacy events without a vmSnapshotId detail).\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fbb5f7fae7225cd0ebf40e74503e2a0b6e2423e4",
      "old_mode": 33188,
      "old_path": "engine/schema/src/main/java/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java",
      "new_id": "72d7cf6ab97c2c8719dcbfc31972785cdffa6a9c",
      "new_mode": 33188,
      "new_path": "engine/schema/src/main/java/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java"
    },
    {
      "type": "modify",
      "old_id": "1f96ff7a8d1b56489c10b6b25e4e720914805182",
      "old_mode": 33188,
      "old_path": "usage/src/main/java/com/cloud/usage/UsageManagerImpl.java",
      "new_id": "7f9cbb9dc2168be1ff5fa6ae5a2c3e765d8dc2c6",
      "new_mode": 33188,
      "new_path": "usage/src/main/java/com/cloud/usage/UsageManagerImpl.java"
    },
    {
      "type": "modify",
      "old_id": "9127df8be988003d39d8ef74e10e050225ac4d4a",
      "old_mode": 33188,
      "old_path": "usage/src/main/java/com/cloud/usage/parser/VMSnapshotUsageParser.java",
      "new_id": "b0e8601488fc61aac1873f0e09b6093521f18967",
      "new_mode": 33188,
      "new_path": "usage/src/main/java/com/cloud/usage/parser/VMSnapshotUsageParser.java"
    },
    {
      "type": "modify",
      "old_id": "81439ae0b995a91ccbbc8e0a88e9ffb6d13dc302",
      "old_mode": 33188,
      "old_path": "usage/src/test/java/com/cloud/usage/UsageManagerImplTest.java",
      "new_id": "b5c59212e9a64aae7318f7f758f34033b8c58752",
      "new_mode": 33188,
      "new_path": "usage/src/test/java/com/cloud/usage/UsageManagerImplTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b58c1fdd2508a9f8a2cf4b1bc8b1315dbf8d9d03",
      "new_mode": 33188,
      "new_path": "usage/src/test/java/com/cloud/usage/parser/VMSnapshotUsageParserTest.java"
    }
  ]
}
