directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: Alias issues
Date Wed, 06 May 2009 09:34:09 GMT
Emmanuel Lecharny schrieb:
> Stefan Seelmann wrote:
>> 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.
>>   
> That should not be the case. It should be fixed.

I created a Jira: https://issues.apache.org/jira/browse/DIRSERVER-1357

>> 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.
>>   
> No. We can have an alias pointing to nothing, we just have to return an
> AliasProbkel error :
> 
> aliasProblem (33)
>         Indicates that an alias problem has occurred.  For example,
>         the code may used to indicate an alias has been dereferenced
>         that names no object.
> 
Yes, makes sense.
> 
>> 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.
>>   
> Same as previously : we should keep the alias, just in case.
>> 3. Keep the current sitation, but then we need to add some error
>> handling for the aliasIdx, oneAliasIdx and subAliasIdx, what is painful
>> IMHO.
>>   
> +1. Painful, but necessary, IMHO... Don't we have a cache will all the
> aliases taht is built when we start the server ? (I don't remember from
> the top of my head ...)

in the JdbmStore we have three indexes for the aliases, see [1]. They
are updated when adding/deleting an alias entry, but not when deleting
the target of an alias. I checked the code and I think we need to update
the oneAliasIdx and subAliasIdx when deleting an alias target.

Kind Regards,
Stefan

[1]
http://cwiki.apache.org/confluence/display/DIRxSRVx11/Structure+and+Organization



Mime
View raw message