Skip to content

Commit ca3c245

Browse files
committed
Fix removal of usage records
1 parent e41add3 commit ca3c245

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,16 +476,11 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
476476
TransactionLegacy txn = TransactionLegacy.currentTxn();
477477
PreparedStatement pstmt = null;
478478
try {
479-
txn.start();
480479
pstmt = txn.prepareAutoCloseStatement(DELETE_ALL_BY_INTERVAL);
481480
pstmt.setLong(1, days);
482481
pstmt.executeUpdate();
483-
txn.commit();
484482
} catch (Exception ex) {
485-
txn.rollback();
486483
s_logger.error("error removing old cloud_usage records for interval: " + days);
487-
} finally {
488-
txn.close();
489484
}
490485
}
491486
});

0 commit comments

Comments
 (0)