From commits-return-31939-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Thu Jun 16 12:18:44 2011 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 C59006B1B for ; Thu, 16 Jun 2011 12:18:44 +0000 (UTC) Received: (qmail 42737 invoked by uid 500); 16 Jun 2011 12:18:44 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 42703 invoked by uid 500); 16 Jun 2011 12:18:44 -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 42696 invoked by uid 99); 16 Jun 2011 12:18:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 12:18:44 +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; Thu, 16 Jun 2011 12:18:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 67C472388A74; Thu, 16 Jun 2011 12:18:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1136395 - in /directory/apacheds/trunk: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ xdbm-partition/src/main/java/org/apache/directo... Date: Thu, 16 Jun 2011 12:18:23 -0000 To: commits@directory.apache.org From: kayyagari@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110616121823.67C472388A74@eris.apache.org> Author: kayyagari Date: Thu Jun 16 12:18:22 2011 New Revision: 1136395 URL: http://svn.apache.org/viewvc?rev=1136395&view=rev Log: o added a new method to reset the master table sequence this fixes an issue with the value assigned to 'parentEntryId' attribute when a context entry gets deleted (this is crucial for properly building rdn index during recovery) Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java?rev=1136395&r1=1136394&r2=1136395&view=diff ============================================================================== --- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java (original) +++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java Thu Jun 16 12:18:22 2011 @@ -251,4 +251,16 @@ public class JdbmMasterTable extends adminTbl.put( property, value ); } } + + + /** + * {@inheritDoc} + */ + public void resetCounter() throws Exception + { + synchronized ( adminTbl ) + { + adminTbl.put( SEQPROP_KEY, "0" ); + } + } } Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1136395&r1=1136394&r2=1136395&view=diff ============================================================================== --- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java (original) +++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java Thu Jun 16 12:18:22 2011 @@ -1158,6 +1158,12 @@ public abstract class AbstractStore exte * @throws Exception on failure to write the property */ void setProperty( String property, String value ) throws Exception; + + + /** + * Resets the root ID to 0, this method should be called after deleting the + * context entry of the partition + * + * @throws Exception in case of any failure while resetting the root id value + */ + void resetCounter() throws Exception; } \ No newline at end of file Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java?rev=1136395&r1=1136394&r2=1136395&view=diff ============================================================================== --- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java (original) +++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java Thu Jun 16 12:18:22 2011 @@ -73,4 +73,13 @@ public class AvlMasterTable extends A { props.setProperty( property, value ); } + + + /** + * {@inheritDoc} + */ + public void resetCounter() throws Exception + { + counter.set( 0L ); + } }