directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1422201 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Date Sat, 15 Dec 2012 08:05:00 GMT
Author: elecharny
Date: Sat Dec 15 08:04:59 2012
New Revision: 1422201

URL: http://svn.apache.org/viewvc?rev=1422201&view=rev
Log:
Removed the EntryDN attribute for all operations that update the masterTable

Modified:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1422201&r1=1422200&r2=1422201&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Sat Dec 15 08:04:59 2012
@@ -586,9 +586,6 @@ public abstract class AbstractBTreeParti
         {
             Entry entry = ( ( ClonedServerEntry ) addContext.getEntry() ).getClonedEntry();
             
-            // Remove the EntryDN
-            entry.removeAttributes( ENTRY_DN_AT );
-            
             Dn entryDn = entry.getDn();
 
             // check if the entry already exists
@@ -739,6 +736,9 @@ public abstract class AbstractBTreeParti
                     updateRdnIdx( parentId, ADD_CHILD, 0 );
                 }
 
+                // Remove the EntryDN attribute
+                entry.removeAttributes( ENTRY_DN_AT );
+                
                 // And finally add the entry into the master table
                 master.put( id, entry );
             }
@@ -1117,9 +1117,6 @@ public abstract class AbstractBTreeParti
                 modifyContext.getModItems().toArray( new Modification[]
                     {} ) );
             
-            // Remove the EntryDN
-            modifiedEntry.removeAttributes( ENTRY_DN_AT );
-
             modifyContext.setAlteredEntry( modifiedEntry );
             
             updateCache( modifyContext );
@@ -1163,6 +1160,10 @@ public abstract class AbstractBTreeParti
         }
 
         updateCsnIndex( entry, id );
+
+        // Remove the EntryDN
+        entry.removeAttributes( ENTRY_DN_AT );
+        
         master.put( id, entry );
 
         if ( isSyncOnWrite.get() )
@@ -1558,6 +1559,10 @@ public abstract class AbstractBTreeParti
 
         // Update the master table with the modified entry
         modifiedEntry.put( SchemaConstants.ENTRY_PARENT_ID_AT, newParentId.toString() );
+
+        // Remove the EntryDN
+        modifiedEntry.removeAttributes( ENTRY_DN_AT );
+        
         master.put( entryId, modifiedEntry );
 
         if ( isSyncOnWrite.get() )
@@ -1870,6 +1875,9 @@ public abstract class AbstractBTreeParti
             }
         }
 
+        // Remove the EntryDN
+        entry.removeAttributes( ENTRY_DN_AT );
+        
         // And save the modified entry
         master.put( oldId, entry );
     }



Mime
View raw message