[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14289270#comment-14289270
 ] 

ASF subversion and git services commented on CLOUDSTACK-8151:
-------------------------------------------------------------

Commit f9a8111e17cdd561203d7098667488ad64888d86 in cloudstack's branch 
refs/heads/master from [~rohit.ya...@shapeblue.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=f9a8111 ]

CLOUDSTACK-8151: Add removeRawUsageRecords API to cleanup old cloud_usage data

Call removeRawUsageRecords with interval (> 0) and it will clean up cloud_usage
table by removing records older than interval no. of days from today (current 
date)
and in case it runs when the job exec time is near, it will fail alerting
user to try again after a 15 min window.

There is an issue with async job scheduler, if this API were async it tries
to search and remove job from cloud_usage.async_job table and fails which is
why this API is sync and extends BaseCmd.

Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>


> An API to cleanup cloud_usage table
> -----------------------------------
>
>                 Key: CLOUDSTACK-8151
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8151
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.5.0, 4.6.0
>            Reporter: Rohit Yadav
>            Assignee: Rohit Yadav
>             Fix For: 4.6.0
>
>
> The cloud_usage table can be very big and once the raw data is processed we 
> can safely remove the rows to reduce database size. There is a KB on this: 
> http://support.citrix.com/article/CTX139043
> The aim is to create a global config (delete records older than specified no. 
> of days) and an API (if necessary) to trigger cleaning up of old entries.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to