You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2023/02/14 22:33:55 UTC
[GitHub] [cloudstack] weizhouapache commented on a diff in pull request #7229: [Usage] Fix wrong usage_type
weizhouapache commented on code in PR #7229:
URL: https://github.com/apache/cloudstack/pull/7229#discussion_r1106449489
##########
engine/schema/src/main/resources/META-INF/db/schema-41720to41800.sql:
##########
@@ -1569,4 +1569,12 @@ CREATE VIEW `cloud`.`user_view` AS
left join
`cloud`.`async_job` ON async_job.instance_id = user.id
and async_job.instance_type = 'User'
- and async_job.job_status = 0;
\ No newline at end of file
+ and async_job.job_status = 0;
+
+-- Change usage of VM_DISK_IO_WRITE to use right usage_type
+UPDATE
+ `cloud_usage`.`cloud_usage`
+SET
+ usage_type = 22
+WHERE
Review Comment:
This might take very long time if usage database is huge. (It is quite normal if usage server has heen running for some years).
Might it be helpful if use the following ?
WHERE usage_type = <type of UsageTypes.VM_DISK_BYTES_WRITE> AND usage_display like '% io write';
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org