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;
|
++count;
|
||||||
++samples;
|
++samples;
|
||||||
}
|
}
|
||||||
DBConnection.execBatch(preparedInsertStmt);
|
|
||||||
if(!error){
|
if(!error){
|
||||||
|
DBConnection.execBatch(preparedInsertStmt);
|
||||||
HalContext.getDB().getConnection().commit();
|
HalContext.getDB().getConnection().commit();
|
||||||
}else{
|
}else{
|
||||||
HalContext.getDB().getConnection().rollback();
|
HalContext.getDB().getConnection().rollback();
|
||||||
|
|
@ -233,9 +233,9 @@ public class DataAggregatorDaemon extends TimerTask implements HalDaemon {
|
||||||
preparedDeleteStmt.setInt(2, result.getInt("sequence_id"));
|
preparedDeleteStmt.setInt(2, result.getInt("sequence_id"));
|
||||||
preparedDeleteStmt.addBatch();
|
preparedDeleteStmt.addBatch();
|
||||||
}
|
}
|
||||||
DBConnection.execBatch(preparedInsertStmt);
|
|
||||||
DBConnection.execBatch(preparedDeleteStmt);
|
|
||||||
if(!error){
|
if(!error){
|
||||||
|
DBConnection.execBatch(preparedInsertStmt);
|
||||||
|
DBConnection.execBatch(preparedDeleteStmt);
|
||||||
HalContext.getDB().getConnection().commit();
|
HalContext.getDB().getConnection().commit();
|
||||||
}else{
|
}else{
|
||||||
HalContext.getDB().getConnection().rollback();
|
HalContext.getDB().getConnection().rollback();
|
||||||
|
|
@ -294,9 +294,9 @@ public class DataAggregatorDaemon extends TimerTask implements HalDaemon {
|
||||||
preparedDeleteStmt.setInt(2, result.getInt("sequence_id"));
|
preparedDeleteStmt.setInt(2, result.getInt("sequence_id"));
|
||||||
preparedDeleteStmt.addBatch();
|
preparedDeleteStmt.addBatch();
|
||||||
}
|
}
|
||||||
DBConnection.execBatch(preparedInsertStmt);
|
|
||||||
DBConnection.execBatch(preparedDeleteStmt);
|
|
||||||
if(!error){
|
if(!error){
|
||||||
|
DBConnection.execBatch(preparedInsertStmt);
|
||||||
|
DBConnection.execBatch(preparedDeleteStmt);
|
||||||
HalContext.getDB().getConnection().commit();
|
HalContext.getDB().getConnection().commit();
|
||||||
}else{
|
}else{
|
||||||
HalContext.getDB().getConnection().rollback();
|
HalContext.getDB().getConnection().rollback();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue