From dev-return-30198-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Tue May 05 22:15:44 2009 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 80215 invoked from network); 5 May 2009 22:15:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 May 2009 22:15:44 -0000 Received: (qmail 95085 invoked by uid 500); 5 May 2009 22:15:43 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 94983 invoked by uid 500); 5 May 2009 22:15:43 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 94975 invoked by uid 99); 5 May 2009 22:15:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 22:15:43 +0000 X-ASF-Spam-Status: No, hits=4.6 required=10.0 tests=FH_HELO_EQ_D_D_D_D,HELO_DYNAMIC_IPADDR,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [92.51.130.250] (HELO lvps92-51-130-250.dedicated.hosteurope.de) (92.51.130.250) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 22:15:35 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lvps92-51-130-250.dedicated.hosteurope.de (Postfix) with ESMTP id 558B31174400E for ; Tue, 5 May 2009 22:15:14 +0000 (UTC) Message-ID: <4A00BA71.5080102@apache.org> Date: Wed, 06 May 2009 00:15:13 +0200 From: Stefan Seelmann User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: directory apache Subject: Alias issues X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi guys, When trying to add an alias entry which aliasedObjectName points to an non-existing entry, this is refused by the server. That's OK to avoid an inconsistent state. However it is possible to - add a real entry, say "ou=people,dc=example,dc=com" - add an alias to it, say "ou=users,dc=example,dc=com" - delete the real entry "ou=people,dc=example,dc=com" After that the alias "ou=users,dc=example,dc=com" still exists and its aliasedObjectName still contains "ou=people,dc=example,dc=com", but that doesn't exist. Now when deleting this alias I get an NPE when dropping the subAliasIdx. I'd like to discuss the possible solutions: 1. Reject deletion of an entry, when an alias points to this entry. This is easy to check in the JdbmStore using the aliasIdx. 2. Automatically delete all alias entries that point to the entry that should be deleted (cool, some kind of cascade delete). This is also easy to implement in JdmbStore. 3. Keep the current sitation, but then we need to add some error handling for the aliasIdx, oneAliasIdx and subAliasIdx, what is painful IMHO. Thoughts? Please note that this is JDBM-specific and all handled within the JdbmStore. Other partition implementations need to re-implement this logic or may work different. Otherwise we must move this checks to a higher level, i.e. to the interceptor chain. Kind Regards, Stefan