Atomikos Forum |
|
Hello,
Using TansactionEssentials 3.8.0, I am getting the following warning: WARN c.a.icatch.imp.CoordinatorImp - Local heuristic termination of coordinator 172.17.41.212.tm0000900034 with state COMMITTING During a simple performance test, like: for (int i = 0; i < 1000; i++) { service1.doSmthInTransaction(i); } in the logs appeared that WARN message next time the application is started. What I've noticed is that if the iterations of the loop is below 250 - there is no warn message. I've configured the log to show TRACE message and after some logs analysis and debugging, noticed that the warn message appear for the coordinator that was used just before the logstream_.writeCheckpoint ( logTable_.elements () ); is called in com.atomikos.persistence.imp.StreamObjectLog.writeCheckpoint(). Then I've found this default82df.html?community.6.2645.6 topic, and with its help I've learned about forgettable_. After some debugging, I think, there is a might be a bug in com.atomikos.persistence.imp.StreamObjectLog.flush( SystemLogImage img , boolean shouldSync ) method. I think, this code: try { logstream_.flushObject ( img , shouldSync ); writeCheckpoint (); // fout_.flush(); } catch ( LogException ioerr ) { ioerr.printStackTrace (); errors.push ( ioerr ); // make sure that logfile remains in consistent state by // checkpointing try { logstream_.writeCheckpoint ( logTable_.elements () ); } catch ( Exception e ) { errors.push ( e ); } throw new LogException ( ioerr.getMessage (), errors ); } must be moved after: if ( img.isForgettable () ) { if ( logTable_.containsKey ( img.getId () ) ) { // to avoid that logTable_ keeps growing! logTable_.remove ( img.getId () ); size_--; } } else { if ( !logTable_.containsKey ( img.getId () ) ) { size_++; } logTable_.put ( img.getId (), img ); } Why, because writeCheckpoint() uses logTable. At the point writeCheckpoint() is called, logTable contains a SystemLogImage with forgettable_ = false. On the other hand the img variable, which is also a SystemLogImage and passed to logstream_.flushObject ( img , shouldSync ); has forgettable_ = true. Is this a bug indeed? Could you please help me understand the situation and get rid of the warning. Thank you. |