Fix a problem in the DbHandler.run() method that appears to make it possible to
create a tight infinite loop if the method is still running after the database
has been closed, repeatedly catching and logging exceptions. This change adds
a break statement after logging the message so that it will exit from the loop.
The exception being caught was:
com.sleepycat.je.DatabaseException: (JE 3.2.29) Attempt to use non-open Environment object().
at com.sleepycat.je.Environment.checkHandleIsValid(Environment.java:1147)
at com.sleepycat.je.Environment.beginTransactionInternal(Environment.java:731)
at com.sleepycat.je.Environment.beginTransaction(Environment.java:720)
at org.opends.server.replication.server.ReplicationDbEnv.beginTransaction(ReplicationDbEnv.java:381)
at org.opends.server.replication.server.ReplicationDB$ReplServerDBCursor.<init>(ReplicationDB.java:363)
at org.opends.server.replication.server.ReplicationDB$ReplServerDBCursor.<init>(ReplicationDB.java:314)
at org.opends.server.replication.server.ReplicationDB.openDeleteCursor(ReplicationDB.java:205)
at org.opends.server.replication.server.DbHandler.trim(DbHandler.java:384)
at org.opends.server.replication.server.DbHandler.run(DbHandler.java:335)
at java.lang.Thread.run(Thread.java:619)
| | |
| | | mb.append(ERR_EXCEPTION_CHANGELOG_TRIM_FLUSH.get()); |
| | | mb.append(stackTraceToSingleLineString(end)); |
| | | logError(mb.toMessage()); |
| | | break; |
| | | } |
| | | } |
| | | // call flush a last time before exiting to make sure that |