cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jay (JIRA)" <>
Subject [jira] [Created] (CLOUDSTACK-9888) Duplicates are generated while processing usage events
Date Thu, 20 Apr 2017 09:32:04 GMT
jay created CLOUDSTACK-9888:

             Summary: Duplicates are generated while processing usage events
                 Key: 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 processes
rest of the events even though they are processed, this causes duplication of usage records.

To avoid duplication usage server should stop when ever there is an exception.
For the same exceptions are not suppressed as part of the fix, this is fail safe fix for now.

 long lastSuccess = m_usageJobDao.getLastJobSuccessDateMillis();
            if (lastSuccess != 0) {
                startDateMillis = lastSuccess+1; // 1 millisecond after

This message was sent by Atlassian JIRA

View raw message