Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 44208 invoked from network); 23 Jun 2009 09:49:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jun 2009 09:49:16 -0000 Received: (qmail 30505 invoked by uid 500); 23 Jun 2009 09:49:28 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 30446 invoked by uid 500); 23 Jun 2009 09:49:27 -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 30437 invoked by uid 99); 23 Jun 2009 09:49:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 09:49:27 +0000 X-ASF-Spam-Status: No, hits=-1999.6 required=10.0 tests=ALL_TRUSTED,SUBJECT_FUZZY_TION 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; Tue, 23 Jun 2009 09:49:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C03902388893; Tue, 23 Jun 2009 09:49:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r787610 - /directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Date: Tue, 23 Jun 2009 09:49:03 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090623094903.C03902388893@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Tue Jun 23 09:49:03 2009 New Revision: 787610 URL: http://svn.apache.org/viewvc?rev=787610&view=rev Log: Added comments in the drop( Long entryId ) method Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=787610&r1=787609&r2=787610&view=diff ============================================================================== --- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java (original) +++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Tue Jun 23 09:49:03 2009 @@ -475,13 +475,17 @@ */ public void drop( Long entryId ) throws Exception { + // Build a cursor to iterate on all the keys referencing + // this entryId Cursor> values = reverse.cursor( entryId ); - + while ( values.next() ) { + // Remove the Key -> entryId from the index forward.remove( values.get().getValue(), entryId ); } + // Remove the id -> key from the reverse index reverse.remove( entryId ); }