Skip to content

Commit b4464d8

Browse files
author
Kishan Kavala
committed
CLOUDSTACK-4281 : Usage - exception was hiding the db error. Make the usage job fail incase of any DB insert exceptions
1 parent b172eb2 commit b4464d8

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

usage/src/com/cloud/usage/parser/NetworkUsageParser.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,8 @@ public static boolean parse(AccountVO account, Date startDate, Date endDate) {
129129
}
130130
}
131131
}
132-
try {
133-
m_usageDao.saveUsageRecords(usageRecords);
134-
} catch (Exception ex) {
135-
s_logger.error("Exception in usage manager", ex);
136-
}
132+
133+
m_usageDao.saveUsageRecords(usageRecords);
137134

138135
return true;
139136
}

usage/src/com/cloud/usage/parser/VmDiskUsageParser.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,7 @@ public static boolean parse(AccountVO account, Date startDate, Date endDate) {
157157
}
158158
}
159159

160-
try {
161-
m_usageDao.saveUsageRecords(usageRecords);
162-
} catch (Exception ex) {
163-
s_logger.error("Exception in usage manager", ex);
164-
}
160+
m_usageDao.saveUsageRecords(usageRecords);
165161

166162
return true;
167163
}

0 commit comments

Comments
 (0)