bug fix for aggregation transations
Former-commit-id: c17ab908a34f8cb2582f094895cec1a2c1ff4781
This commit is contained in:
parent
fbb910ef94
commit
b164474b76
1 changed files with 5 additions and 5 deletions
|
|
@ -174,8 +174,8 @@ public class DataAggregatorDaemon extends TimerTask implements HalDaemon {
|
|||
++count;
|
||||
++samples;
|
||||
}
|
||||
DBConnection.execBatch(preparedInsertStmt);
|
||||
if(!error){
|
||||
DBConnection.execBatch(preparedInsertStmt);
|
||||
HalContext.getDB().getConnection().commit();
|
||||
}else{
|
||||
HalContext.getDB().getConnection().rollback();
|
||||
|
|
@ -233,9 +233,9 @@ public class DataAggregatorDaemon extends TimerTask implements HalDaemon {
|
|||
preparedDeleteStmt.setInt(2, result.getInt("sequence_id"));
|
||||
preparedDeleteStmt.addBatch();
|
||||
}
|
||||
DBConnection.execBatch(preparedInsertStmt);
|
||||
DBConnection.execBatch(preparedDeleteStmt);
|
||||
if(!error){
|
||||
DBConnection.execBatch(preparedInsertStmt);
|
||||
DBConnection.execBatch(preparedDeleteStmt);
|
||||
HalContext.getDB().getConnection().commit();
|
||||
}else{
|
||||
HalContext.getDB().getConnection().rollback();
|
||||
|
|
@ -294,9 +294,9 @@ public class DataAggregatorDaemon extends TimerTask implements HalDaemon {
|
|||
preparedDeleteStmt.setInt(2, result.getInt("sequence_id"));
|
||||
preparedDeleteStmt.addBatch();
|
||||
}
|
||||
DBConnection.execBatch(preparedInsertStmt);
|
||||
DBConnection.execBatch(preparedDeleteStmt);
|
||||
if(!error){
|
||||
DBConnection.execBatch(preparedInsertStmt);
|
||||
DBConnection.execBatch(preparedDeleteStmt);
|
||||
HalContext.getDB().getConnection().commit();
|
||||
}else{
|
||||
HalContext.getDB().getConnection().rollback();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue