directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject We may need to add a hasChildren() method in the Partition interface
Date Fri, 02 Dec 2011 08:51:18 GMT
Hi guys,

yesterday, we were tracking a bug in the schema manager. When we tried 
to delete a schema, we got an error because under the schema entry, we 
had some entries (cn=attributesTypes, etc). The entry wasn't deleted, 
which is good, but the problem was that the schema was removed from the 
registries, because it was removed before we tried to do the removal in 
the underlying LDIF partition.

So we added a check to see if the entry has a child, in order to reject 
the deletion in all cases (including from the registries). Sadly, we had 
to code a search (ONE_LEVEL) to now if we had some children. This could 
have been done using a lookup in the one_level index, but it's not 
exposed by the Partition interface.

Adding a hasChildren(Dn) method would help, as we could get the result 
either by using the one_level index if it exists, or by doing something 

wdyt ?

Emmanuel L├ęcharny

View raw message