db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r532635 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/io/ engine/org/apache/derby/impl/store/raw/log/ engine/org/apache/derby/io/ testing/org/apache/derbyTesting/functionTests/util/corruptio/
Date Thu, 26 Apr 2007 07:15:03 GMT
Author: kahatlen
Date: Thu Apr 26 00:15:02 2007
New Revision: 532635

URL: http://svn.apache.org/viewvc?view=rev&rev=532635
Log:
DERBY-2020 (partial) Change file option for syncing log file to disk
from rws to rwd

1. Rename the method called supportsRws() to supportWriteSync() in
   WritableStorageFactory and all of its implementations.

2. Fixed code comments referring to "rws" to also include "rwd" so
   that the comments also will be valid if rwd is used.

Patch contributed by Olav Sandstå.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory4.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
    db/derby/code/trunk/java/engine/org/apache/derby/io/WritableStorageFactory.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory.java?view=diff&rev=532635&r1=532634&r2=532635
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory.java Thu Apr
26 00:15:02 2007
@@ -148,14 +148,16 @@
     }
 
     /**
-     * This method tests whether the "rws" and "rwd" modes are implemented. If the "rws"
method is supported
-     * then the database engine will conclude that the write methods of "rws" mode StorageRandomAccessFiles
are
-     * slow but the sync method is fast and optimize accordingly.
+     * This method tests whether the "rws" and "rwd" modes are implemented. If
+     * the "rws" and "rwd" modes are supported then the database engine will
+     * conclude that the write methods of "rws"/"rwd" mode
+     * StorageRandomAccessFiles are slow but the sync method is fast and
+     * optimize accordingly.
      *
      * @return <b>true</b> if an StIRandomAccess file opened with "rws" or "rwd"
modes immediately writes data to the
      *         underlying storage, <b>false</b> if not.
      */
-    public boolean supportsRws()
+    public boolean supportsWriteSync()
     {
         return false;
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory4.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory4.java?view=diff&rev=532635&r1=532634&r2=532635
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory4.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/io/DirStorageFactory4.java Thu Apr
26 00:15:02 2007
@@ -88,14 +88,16 @@
 
 	
     /**
-     * This method tests whether the "rws" and "rwd" modes are implemented. If the "rws"
method is supported
-     * then the database engine will conclude that the write methods of "rws" mode StorageRandomAccessFiles
are
-     * slow but the sync method is fast and optimize accordingly.
+     * This method tests whether the "rws" and "rwd" modes are implemented. If
+     * the "rws" and "rwd" modes are supported then the database engine will
+     * conclude that the write methods of "rws"/"rwd" mode
+     * StorageRandomAccessFiles are slow but the sync method is fast and
+     * optimize accordingly.
      *
      * @return <b>true</b> if an StIRandomAccess file opened with "rws" or "rwd"
modes immediately writes data to the
      *         underlying storage, <b>false</b> if not.
      */
-    public boolean supportsRws()
+    public boolean supportsWriteSync()
     {
         return rwsOK;
     }

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?view=diff&rev=532635&r1=532634&r2=532635
==============================================================================
--- 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 Thu
Apr 26 00:15:02 2007
@@ -439,7 +439,7 @@
 	 * Note : The reason to support file and write sync of logs is 
 	 * there was no support to do write sync until jdk1.4 and then
 	 * there was write sync jvm bug in jdk1.4.1, only in jdk1.4.2 write 
-	 * sync(rws mode)  mechanism can be used corretly.
+	 * sync(rws and rwd modes) mechanism can be used correctly.
 	 * Default in JVMS >= jdk1.4.2 is write sync(see the boot method for jvm checks).
 	 *
 	 * Write sync mechanism support is added  for performance reasons. 
@@ -2906,11 +2906,12 @@
 		//get log factorty properties if any set in derby.properties
 		getLogFactoryProperties(null);
 
-		/* check if the storage factory supports write sync(rws).  If so, use it unless
-		 * derby.storage.fileSyncTransactionLog property is set true by user.
+		/* check if the storage factory supports write sync (rws and rwd). If
+		 * so, use it unless derby.storage.fileSyncTransactionLog property is
+		 * set true by user.
 		 */
 
-		if (logStorageFactory.supportsRws())
+		if (logStorageFactory.supportsWriteSync())
         {
 			//write sync can be used in the jvm that database is running on.
 			//disable write sync if derby.storage.fileSyncTransactionLog is true

Modified: db/derby/code/trunk/java/engine/org/apache/derby/io/WritableStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/io/WritableStorageFactory.java?view=diff&rev=532635&r1=532634&r2=532635
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/io/WritableStorageFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/io/WritableStorageFactory.java Thu Apr
26 00:15:02 2007
@@ -57,13 +57,13 @@
 
     /**
      * This method tests whether the StorageRandomAccessFile "rws" and "rwd" modes
-     * are implemented. If the "rws" method is supported then the database
-     * engine will conclude that the write methods of "rws" mode
+     * are implemented. If the "rws" and "rwd" modes are supported then the database
+     * engine will conclude that the write methods of "rws"/"rwd" mode
      * StorageRandomAccessFiles are slow but the sync method is fast and optimize
      * accordingly.
      *
      * @return <b>true</b> if an StIRandomAccess file opened with "rws" or "rwd"
modes immediately writes data to the
      *         underlying storage, <b>false</b> if not.
      */
-    public boolean supportsRws();
+    public boolean supportsWriteSync();
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java?view=diff&rev=532635&r1=532634&r2=532635
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java
Thu Apr 26 00:15:02 2007
@@ -242,16 +242,16 @@
     /**
      * This method tests whether the "rws" and "rwd" modes are implemented. 
      *
-     * If the "rws" method is supported then the database engine will conclude 
-     * that the write methods of "rws" mode StorageRandomAccessFiles are
-     * slow but the sync method is fast and optimize accordingly.
+     * If the "rws" and "rwd" modes are supported then the database engine will
+     * conclude that the write methods of "rws" mode StorageRandomAccessFiles
+     * are slow but the sync method is fast and optimize accordingly.
      *
      * @return <b>true</b> if an StIRandomAccess file opened with "rws" or "rwd"
modes immediately writes data to the
      *         underlying storage, <b>false</b> if not.
      */
-    public boolean supportsRws()
+    public boolean supportsWriteSync()
     {
-		return realStorageFactory.supportsRws();
+		return realStorageFactory.supportsWriteSync();
     }
 
 	



Mime
View raw message