directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r964004 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
Date Wed, 14 Jul 2010 10:42:54 GMT
Author: elecharny
Date: Wed Jul 14 10:42:54 2010
New Revision: 964004

URL: http://svn.apache.org/viewvc?rev=964004&view=rev
Log:
Major speedup in a search request : replacing a call to cursor.next() by a call to cursor.available()
increase the speed by 30%

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=964004&r1=964003&r2=964004&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
Wed Jul 14 10:42:54 2010
@@ -454,8 +454,8 @@ public class ExceptionInterceptor extend
         {
             EntryFilteringCursor cursor = nextInterceptor.search( searchContext );
 
-            if ( !cursor.next() && !base.isEmpty()
-                && !( subschemSubentryDn.getNormName() ).equalsIgnoreCase( base.getNormName()
) )
+            // Check that if the cursor is empty, it's not because the DN is invalid.
+            if ( !cursor.available() && !base.isEmpty() && !subschemSubentryDn.equals(
base ) )
             {
                 // We just check that the entry exists only if we didn't found any entry
                 assertHasEntry( searchContext, "Attempt to search under non-existant entry:",
searchContext.getDn() );



Mime
View raw message