db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject 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
Date Fri, 05 Oct 2012 08:40:59 GMT
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;



Mime
View raw message