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 oy...@apache.org on 2008/03/04 11:45:31 UTC

svn commit: r633419 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java

Author: oysteing
Date: Tue Mar  4 02:45:17 2008
New Revision: 633419

URL: http://svn.apache.org/viewvc?rev=633419&view=rev
Log:
DERBY-3475: Ensure that the control file is not updated when the database is booted in slave pre mode by disabling checkpointing.
Contributed by Jorgen Loland

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.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=633419&r1=633418&r2=633419&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 Tue Mar  4 02:45:17 2008
@@ -1472,6 +1472,14 @@
 		 throws StandardException
 	{
 
+		if (inReplicationSlavePreMode) {
+			// Writing a checkpoing updates the log files and the log.ctrl
+			// file. This cannot be allowed in slave pre mode because the slave
+			// and master log files need to be equal when the database is
+			// booted in slave mode (the next phase of the start slave command).
+			return true;
+		}
+
 		// call checkpoint with no pre-started transaction
 		boolean done = checkpointWithTran(null, rsf, df, tf);