db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r749805 - in /db/derby/code/branches/10.1/java: engine/org/apache/derby/iapi/reference/ engine/org/apache/derby/impl/store/raw/ engine/org/apache/derby/impl/store/raw/data/ engine/org/apache/derby/loc/ testing/org/apache/derbyTesting/functi...
Date Tue, 03 Mar 2009 22:27:50 GMT
Author: kmarsden
Date: Tue Mar  3 22:27:50 2009
New Revision: 749805

URL: http://svn.apache.org/viewvc?rev=749805&view=rev
Log:
DERBY-555 Unable to restart after disk is full
Also logs read only boot message.
Contributed by Oystein Grovlen.  merged revision 325896 from trunk.


Added:
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/TurnsReadOnly.out
      - copied unchanged from r325896, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TurnsReadOnly.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/TurnsReadOnly.java
      - copied unchanged from r325896, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TurnsReadOnly.java
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/TurnsReadOnly_app.properties
      - copied unchanged from r325896, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TurnsReadOnly_app.properties
Modified:
    db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/reference/MessageId.java
    db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/RawStore.java
    db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
    db/derby/code/branches/10.1/java/engine/org/apache/derby/loc/messages_en.properties
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/reference/MessageId.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/reference/MessageId.java?rev=749805&r1=749804&r2=749805&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/reference/MessageId.java
(original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/reference/MessageId.java
Tue Mar  3 22:27:50 2009
@@ -82,6 +82,7 @@
     String STORE_BACKUP_COMPLETED           = "D012";
     String STORE_DURABILITY_TESTMODE_NO_SYNC = "D013"; // for derby.system.durability is

                                                        // set to test
+    String STORE_BOOT_READONLY_MSG          = "D014";
 
 
 	/*

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/RawStore.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/RawStore.java?rev=749805&r1=749804&r2=749805&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/RawStore.java
(original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/RawStore.java
Tue Mar  3 22:27:50 2009
@@ -274,8 +274,10 @@
 		String logDevice = properties.getProperty(Attribute.LOG_DEVICE);
 		if (logDevice !=null)
 		{
-			if (create || !logDevice.equals(logFactory.getCanonicalLogPath()) ||
-				restoreFromBackup!=null)
+            if (!isReadOnly() // We do not care about log location if read only
+                && (create 
+                    || !logDevice.equals(logFactory.getCanonicalLogPath()) 
+                    || restoreFromBackup!=null))
 			{
 				// get the real location from the log factory
 				properties.put(Attribute.LOG_DEVICE, logFactory.getCanonicalLogPath());

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=749805&r1=749804&r2=749805&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Tue Mar  3 22:27:50 2009
@@ -326,12 +326,16 @@
 
 		logMsg(LINE);
 		long bootTime = System.currentTimeMillis();
+        String readOnlyMsg = (isReadOnly()) 
+            ? MessageService.getTextMessage(MessageId.STORE_BOOT_READONLY_MSG)
+            : "";
 
 		logMsg(CheapDateFormatter.formatDate(bootTime) +
 			   MessageService.getTextMessage(MessageId.STORE_BOOT_MSG,
-			   									jbmsVersion,
-												identifier,
-												dataDirectory));
+                                             jbmsVersion,
+                                             identifier,
+                                             dataDirectory,
+                                             readOnlyMsg));
 
 		uf = null;
 

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/loc/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/loc/messages_en.properties?rev=749805&r1=749804&r2=749805&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/loc/messages_en.properties (original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/loc/messages_en.properties Tue
Mar  3 22:27:50 2009
@@ -1184,7 +1184,7 @@
 
 # RawStore Data
 
-D001=:\n Booting Derby version {0}: instance {1}\non database directory {2} \n
+D001=:\n Booting Derby version {0}: instance {1}\non database directory {2} {3} \n
 D002=:\nShutting down instance {0}
 D004=Backup started for database located at {0}
 D005=moved old backup copy from {0} to {1}
@@ -1196,6 +1196,7 @@
 D011=removed old backup copy at {0}
 D012=Backup completed, log instant at {0} \n
 D013=WARNING: The database is booted with {0}={1}. In this mode, it is possible that database
may not be able to recover, committed transactions may be lost, database may be in an inconsistent
state. Please use this mode only when these consequences are acceptable  \n
+D014=in READ ONLY mode
 
 # Connectivity 
 J004=database identity

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant?rev=749805&r1=749804&r2=749805&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
Tue Mar  3 22:27:50 2009
@@ -23,6 +23,7 @@
 TransactionTable.sql
 TransactionTable_app.properties
 TransactionTable_derby.properties
+TurnsReadOnly_app.properties
 access.sql
 access_app.properties
 access_derby.properties



Mime
View raw message