You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/06/14 12:52:21 UTC

svn commit: r1135472 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Author: elecharny
Date: Tue Jun 14 10:52:21 2011
New Revision: 1135472

URL: http://svn.apache.org/viewvc?rev=1135472&view=rev
Log:
Removed the Cycle detection check in the addAliasIndices() method.

Modified:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

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=1135472&r1=1135471&r2=1135472&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 Tue Jun 14 10:52:21 2011
@@ -1792,32 +1792,6 @@ public abstract class AbstractStore<E, I
         normalizedAliasTargetDn = new Dn( schemaManager, aliasTarget );
 
         /*
-         * Check For Cycles
-         *
-         * Before wasting time to lookup more values we check using the target
-         * dn to see if we have the possible formation of an alias cycle.  This
-         * happens when the alias refers back to a target that is also a
-         * relative of the alias entry.  For detection we test if the aliased
-         * entry Dn starts with the target Dn.  If it does then we know the
-         * aliased target is a relative and we have a perspecitive cycle.
-         */
-        if ( aliasDn.isDescendantOf( normalizedAliasTargetDn ) )
-        {
-            if ( aliasDn.equals( normalizedAliasTargetDn ) )
-            {
-                String msg = I18n.err( I18n.ERR_223 );
-                LdapAliasDereferencingException e = new LdapAliasDereferencingException( msg );
-                //e.setResolvedName( aliasDn );
-                throw e;
-            }
-
-            String msg = I18n.err( I18n.ERR_224, aliasTarget, aliasDn );
-            LdapAliasDereferencingException e = new LdapAliasDereferencingException( msg );
-            //e.setResolvedName( aliasDn );
-            throw e;
-        }
-
-        /*
          * Check For Aliases External To Naming Context
          *
          * id may be null but the alias may be to a valid entry in



Re: svn commit: r1135472 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Posted by Alex Karasulu <ak...@apache.org>.
Thanks Emm!

On Wed, Jun 15, 2011 at 12:43 PM, Emmanuel Lécharny
<el...@apache.org> wrote:
> On 6/15/11 11:17 AM, Alex Karasulu wrote:
>>
>> On Wed, Jun 15, 2011 at 8:52 AM, Emmanuel Lecharny<el...@gmail.com>
>>  wrote:
>>>
>>> On 6/15/11 2:45 AM, Alex Karasulu wrote:
>>>>
>>>> -1
>>>>
>>>> Please revert these changes. Sufficient consideration has not been
>>>> given to these matters which have been around for years. We need more
>>>> time to discuss these matters.
>>>
>>> This check is just not good enough, even if we want to detect cycles when
>>> adding aliases : it does not check anything but a cycle from an alias and
>>> a
>>> direct ascendant.
>>>
>>> I removed it because of its deficiencies, not because I wanted to remove
>>> the
>>> check. If we decide to implement a check when creating an alias, we will
>>> add
>>> a correct detection mechanism, trust me on that.
>>
>> OK understood. I thought we were going to change this entire policy
>> regarding how we deal with aliases. Then this is no problem at all.
>> Adding a better check to prevent these cycles will be good. If we
>> don't do this we might seriously screw up search and the problems
>> generated will be very interesting if aliasDereferencing is enabled.
>>
>> I just don't want to take such a step without guaranteeing we're not
>> going break search handling.
>
> As I said to Alex on IM, I haven't closed the JIRA that relates the pb. I
> don't consider the problem fixed by the check removal. It's an intermediary
> step.
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>

Re: svn commit: r1135472 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Posted by Emmanuel Lécharny <el...@apache.org>.
On 6/15/11 11:17 AM, Alex Karasulu wrote:
> On Wed, Jun 15, 2011 at 8:52 AM, Emmanuel Lecharny<el...@gmail.com>  wrote:
>> On 6/15/11 2:45 AM, Alex Karasulu wrote:
>>> -1
>>>
>>> Please revert these changes. Sufficient consideration has not been
>>> given to these matters which have been around for years. We need more
>>> time to discuss these matters.
>> This check is just not good enough, even if we want to detect cycles when
>> adding aliases : it does not check anything but a cycle from an alias and a
>> direct ascendant.
>>
>> I removed it because of its deficiencies, not because I wanted to remove the
>> check. If we decide to implement a check when creating an alias, we will add
>> a correct detection mechanism, trust me on that.
> OK understood. I thought we were going to change this entire policy
> regarding how we deal with aliases. Then this is no problem at all.
> Adding a better check to prevent these cycles will be good. If we
> don't do this we might seriously screw up search and the problems
> generated will be very interesting if aliasDereferencing is enabled.
>
> I just don't want to take such a step without guaranteeing we're not
> going break search handling.

As I said to Alex on IM, I haven't closed the JIRA that relates the pb. 
I don't consider the problem fixed by the check removal. It's an 
intermediary step.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: svn commit: r1135472 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Posted by Alex Karasulu <ak...@apache.org>.
On Wed, Jun 15, 2011 at 8:52 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 6/15/11 2:45 AM, Alex Karasulu wrote:
>>
>> -1
>>
>> Please revert these changes. Sufficient consideration has not been
>> given to these matters which have been around for years. We need more
>> time to discuss these matters.
>
> This check is just not good enough, even if we want to detect cycles when
> adding aliases : it does not check anything but a cycle from an alias and a
> direct ascendant.
>
> I removed it because of its deficiencies, not because I wanted to remove the
> check. If we decide to implement a check when creating an alias, we will add
> a correct detection mechanism, trust me on that.

OK understood. I thought we were going to change this entire policy
regarding how we deal with aliases. Then this is no problem at all.
Adding a better check to prevent these cycles will be good. If we
don't do this we might seriously screw up search and the problems
generated will be very interesting if aliasDereferencing is enabled.

I just don't want to take such a step without guaranteeing we're not
going break search handling.

Regards,
Alex

Re: svn commit: r1135472 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 6/15/11 2:45 AM, Alex Karasulu wrote:
> -1
>
> Please revert these changes. Sufficient consideration has not been
> given to these matters which have been around for years. We need more
> time to discuss these matters.
This check is just not good enough, even if we want to detect cycles 
when adding aliases : it does not check anything but a cycle from an 
alias and a direct ascendant.

I removed it because of its deficiencies, not because I wanted to remove 
the check. If we decide to implement a check when creating an alias, we 
will add a correct detection mechanism, trust me on that.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: svn commit: r1135472 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Posted by Alex Karasulu <ak...@apache.org>.
-1

Please revert these changes. Sufficient consideration has not been
given to these matters which have been around for years. We need more
time to discuss these matters.

Thanks,
Alex

On Tue, Jun 14, 2011 at 1:52 PM,  <el...@apache.org> wrote:
> Author: elecharny
> Date: Tue Jun 14 10:52:21 2011
> New Revision: 1135472
>
> URL: http://svn.apache.org/viewvc?rev=1135472&view=rev
> Log:
> Removed the Cycle detection check in the addAliasIndices() method.
>
> Modified:
>    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
>
> 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=1135472&r1=1135471&r2=1135472&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 Tue Jun 14 10:52:21 2011
> @@ -1792,32 +1792,6 @@ public abstract class AbstractStore<E, I
>         normalizedAliasTargetDn = new Dn( schemaManager, aliasTarget );
>
>         /*
> -         * Check For Cycles
> -         *
> -         * Before wasting time to lookup more values we check using the target
> -         * dn to see if we have the possible formation of an alias cycle.  This
> -         * happens when the alias refers back to a target that is also a
> -         * relative of the alias entry.  For detection we test if the aliased
> -         * entry Dn starts with the target Dn.  If it does then we know the
> -         * aliased target is a relative and we have a perspecitive cycle.
> -         */
> -        if ( aliasDn.isDescendantOf( normalizedAliasTargetDn ) )
> -        {
> -            if ( aliasDn.equals( normalizedAliasTargetDn ) )
> -            {
> -                String msg = I18n.err( I18n.ERR_223 );
> -                LdapAliasDereferencingException e = new LdapAliasDereferencingException( msg );
> -                //e.setResolvedName( aliasDn );
> -                throw e;
> -            }
> -
> -            String msg = I18n.err( I18n.ERR_224, aliasTarget, aliasDn );
> -            LdapAliasDereferencingException e = new LdapAliasDereferencingException( msg );
> -            //e.setResolvedName( aliasDn );
> -            throw e;
> -        }
> -
> -        /*
>          * Check For Aliases External To Naming Context
>          *
>          * id may be null but the alias may be to a valid entry in
>
>
>