vedulasantosh commented on issue #2100: CLOUDSTACK-9907 Physical size of snapshot is considered for usage URL: https://github.com/apache/cloudstack/pull/2100#issuecomment-303023562 Test LGTM In my observation when we give the global configuration (usage.snapshot.virtualsize.select) value as true virtual size of the snapshot is considered(10th row in table1, 4th row in table2). In second case when we give the global configuration (usage.snapshot.virtualsize.select) value as false physical size of the snapshot is considered(11th row in table1, 6th row in table2). mysql> select * from cloud_usage.usage_event where id in (10,11); +----+-----------------+------------+---------------------+---------+-------------+-------------------+-------------+-------------+-------+---------------+-----------+--------------+ | id | type | account_id | created | zone_id | resource_id | resource_name | offering_id | template_id | size | resource_type | processed | virtual_size | +----+-----------------+------------+---------------------+---------+-------------+-------------------+-------------+-------------+-------+---------------+-----------+--------------+ | 10 | SNAPSHOT.CREATE | 2 | 2017-05-22 06:51:50 | 1 | 4 | Snapshot-root-3 | NULL | NULL | 45056 | NULL | 1 | 21474836480 | | 11 | SNAPSHOT.CREATE | 2 | 2017-05-22 07:09:35 | 1 | 6 | Snapshot-root-3-2 | NULL | NULL | 45056 | NULL | 1 | 21474836480 | +----+-----------------+------------+---------------------+---------+-------------+-------------------+-------------+-------------+-------+---------------+-----------+--------------+ 2 rows in set (0.00 sec) mysql> select * from usage_storage where id in (4,6); +----+---------+------------+-----------+--------------+-----------+-------------+---------------------+---------+--------------+ | id | zone_id | account_id | domain_id | storage_type | source_id | size | created | deleted | virtual_size | +----+---------+------------+-----------+--------------+-----------+-------------+---------------------+---------+--------------+ | 4 | 1 | 2 | 1 | 3 | NULL | 21474836480 | 2017-05-22 06:51:50 | NULL | NULL | | 6 | 1 | 2 | 1 | 3 | NULL | 45056 | 2017-05-22 07:09:35 | NULL | NULL | +----+---------+------------+-----------+--------------+-----------+-------------+---------------------+---------+--------------+ 2 rows in set (0.00 sec) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
