directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From malder...@apache.org
Subject svn commit: r565556 - /directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
Date Mon, 13 Aug 2007 22:20:51 GMT
Author: malderson
Date: Mon Aug 13 15:20:49 2007
New Revision: 565556

URL: http://svn.apache.org/viewvc?view=rev&rev=565556
Log:
Fixed a couple of problems stopping the entries marked as deleted from getting physically
removed.

Modified:
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?view=diff&rev=565556&r1=565555&r2=565556
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
Mon Aug 13 15:20:49 2007
@@ -301,7 +301,7 @@
 
         try
         {
-            filter = parser.parse( "(& (" + ENTRY_CSN_OID + "=<" + purgeCSN.toOctetString()
+ ") (" + ENTRY_DELETED_OID
+            filter = parser.parse( "(& (" + ENTRY_CSN_OID + "<=" + purgeCSN.toOctetString()
+ ") (" + ENTRY_DELETED_OID
                 + "=TRUE))" );
         }
         catch ( IOException e )
@@ -344,7 +344,7 @@
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
         ctrl.setReturningAttributes( new String[] { "entryCSN", "entryDeleted" } );
 
-        NamingEnumeration e = nexus.search( 
+        NamingEnumeration<SearchResult> e = nexus.search( 
             new SearchOperationContext( contextName, directoryServiceConfiguration.getEnvironment(),
filter, ctrl ) );
 
         List<LdapDN> names = new ArrayList<LdapDN>();
@@ -352,7 +352,7 @@
         {
             while ( e.hasMore() )
             {
-                SearchResult sr = ( SearchResult ) e.next();
+                SearchResult sr = e.next();
                 LdapDN name = new LdapDN( sr.getName() );
                 if ( name.size() > contextName.size() )
                 {
@@ -365,12 +365,11 @@
             e.close();
         }
 
-        Iterator<LdapDN> it = names.iterator();
-        while ( it.hasNext() )
+        for ( LdapDN name : names )
         {
-            LdapDN name = it.next();
             try
             {
+                name.normalize( attrRegistry.getNormalizerMapping() );
                 Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
                 log.info( "Purge: " + name + " (" + entry + ')' );
                 nexus.delete( new DeleteOperationContext( name ) );



Mime
View raw message