You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2012/10/05 10:40:59 UTC
svn commit: r1394407 - in /db/derby/code/trunk/java:
engine/org/apache/derby/impl/store/raw/log/LogToFile.java
testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java
Author: kahatlen
Date: Fri Oct 5 08:40:58 2012
New Revision: 1394407
URL: http://svn.apache.org/viewvc?rev=1394407&view=rev
Log:
DERBY-5937: File handle is leaked when a Slave replication is shutdown with failover=true
Recovery should close current log file before opening a new one.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java?rev=1394407&r1=1394406&r2=1394407&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java Fri Oct 5 08:40:58 2012
@@ -1182,7 +1182,15 @@ public final class LogToFile implements
}
if (theLog != null)
+ {
+ if (logOut != null)
+ {
+ // Close the currently open log file, if there is
+ // one. DERBY-5937.
+ logOut.close();
+ }
logOut = new LogAccessFile(this, theLog, logBufferSize);
+ }
if(logSwitchRequired)
switchLogFile();
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java?rev=1394407&r1=1394406&r2=1394407&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java Fri Oct 5 08:40:58 2012
@@ -85,8 +85,7 @@ public class ReplicationSuite extends Ba
suite.addTest(ReplicationRun_Local_Derby4910.suite());
- // Enable when DERBY-5937 has been fixed.
- //suite.addTest(Derby5937SlaveShutdownTest.suite());
+ suite.addTest(Derby5937SlaveShutdownTest.suite());
}
return suite;