You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/09/27 20:02:16 UTC

svn commit: r1001845 - /directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java

Author: kayyagari
Date: Mon Sep 27 18:02:16 2010
New Revision: 1001845

URL: http://svn.apache.org/viewvc?rev=1001845&view=rev
Log:
o some performacnce improvement by deferring writes to config partition

Modified:
    directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java

Modified: directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
URL: http://svn.apache.org/viewvc/directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java?rev=1001845&r1=1001844&r2=1001845&view=diff
==============================================================================
--- directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java (original)
+++ directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java Mon Sep 27 18:02:16 2010
@@ -292,8 +292,15 @@ public class Service implements DaemonAp
         {
             LOG.info( "begining to update config partition LDIF files after modifying manadatory attributes" );
             
+            // disable writes to the disk upon every modification to improve performance
+            configPartition.setEnableRewriting( false );
+            
+            // perform updates
             updateMandatoryOpAttributes( configPartition, directoryService );
             
+            // enable writes to disk, this will save the partition data first if found dirty
+            configPartition.setEnableRewriting( true );
+            
             LOG.info( "config partition data was successfully updated" );
         }