[
https://issues.apache.org/jira/browse/CLOUDSTACK-9888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16044319#comment-16044319
]
jay commented on CLOUDSTACK-9888:
---------------------------------
https://github.com/apache/cloudstack/pull/2058
> Duplicate usage while processing usage events
> ---------------------------------------------
>
> Key: CLOUDSTACK-9888
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9888
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: jay
>
> Usage manager start processing events from current date or last processed
> event.
> In case of exception, exception is suppressed in the current implementation
> and usage server process rest of the events.
> when usage server starts again it picks the unprocessed event (due to
> exception) and reports the usage from unprocessed event date.
> To avoid duplication usage server should stop when ever there is an exception.
> code:
> Date oldestEventDate = events.get(0).getCreateDate();
> if (oldestEventDate.getTime() < startDateMillis) {
> startDateMillis = oldestEventDate.getTime();
> startDate = new Date(startDateMillis);
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)