Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E284B4203 for ; Fri, 1 Jul 2011 08:43:04 +0000 (UTC) Received: (qmail 62917 invoked by uid 500); 1 Jul 2011 08:43:02 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 62716 invoked by uid 500); 1 Jul 2011 08:42:53 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 62690 invoked by uid 99); 1 Jul 2011 08:42:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2011 08:42:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2011 08:42:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C35F023889DA for ; Fri, 1 Jul 2011 08:42:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1141871 - in /directory/apacheds/branches/apacheds-no-reverse-index: jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ Date: Fri, 01 Jul 2011 08:42:23 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110701084223.C35F023889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Fri Jul 1 08:42:23 2011 New Revision: 1141871 URL: http://svn.apache.org/viewvc?rev=1141871&view=rev Log: o Fixed a test (catching the correct exception) o Fixed the way we handled the subLevel index : we were injecting too many IDs into it Modified: directory/apacheds/branches/apacheds-no-reverse-index/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java Modified: directory/apacheds/branches/apacheds-no-reverse-index/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-no-reverse-index/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1141871&r1=1141870&r2=1141871&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-no-reverse-index/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java (original) +++ directory/apacheds/branches/apacheds-no-reverse-index/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java Fri Jul 1 08:42:23 2011 @@ -53,6 +53,7 @@ import org.apache.directory.shared.ldap. import org.apache.directory.shared.ldap.model.entry.Entry; import org.apache.directory.shared.ldap.model.entry.Modification; import org.apache.directory.shared.ldap.model.entry.ModificationOperation; +import org.apache.directory.shared.ldap.model.exception.LdapContextNotEmptyException; import org.apache.directory.shared.ldap.model.exception.LdapNoSuchObjectException; import org.apache.directory.shared.ldap.model.exception.LdapSchemaViolationException; import org.apache.directory.shared.ldap.model.name.Dn; @@ -477,7 +478,7 @@ public class JdbmStoreTest } - @Test + @Test( expected=LdapContextNotEmptyException.class ) public void testFreshStore() throws Exception { Dn dn = new Dn( schemaManager, "o=Good Times Co." ); Modified: directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1141871&r1=1141870&r2=1141871&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java (original) +++ directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java Fri Jul 1 08:42:23 2011 @@ -942,6 +942,13 @@ public abstract class AbstractStore parentIds = getParentIds( entryDn ); + + ID contextEntryId = rootId; + + if ( parentIds.size() > 1 ) + { + contextEntryId = parentIds.get( 1 ); + } // First, get the ParentId and create the key to be added in the rdnIdx if ( entryDn.equals( suffixDn ) ) @@ -996,21 +1003,24 @@ public abstract class AbstractStore tuple subLevelIdx.add( id, newId ); + //System.out.println( "Adding <" + id + ", " + newId + ">" ); } // making entry an ancestor/descendent of itself in sublevel index subLevelIdx.add( newId, newId ); + //System.out.println( "Adding self <" + newId + ", " + newId + ">" ); // The entryCSN index Attribute entryCsn = entry.get( ENTRY_CSN_AT );