[Fedora-directory-devel] Please Review: (457951) Range search shouldn't be used when a DNA prefix is set
nkinder at redhat.com
Tue Aug 5 18:33:09 UTC 2008
Resolves: bug 457951
Bug Description: The DNA plug-in uses a range search internally to
locate the next
free value within the managed range. This works fine when the values
integers, but the DNA plug-in supports a prefix to the integer portion
value (such as "user1 - user1000").
Reviewed by: ???
Files: see diff
Fix Description: When a prefix is defined, we should not use a range
search to locate
the next free value. We should simply do an exact match search to see
if the next
value in the cached configuration entry is free. If it is not free,
through each value in the range until we either find a free value, or
end of the range. This will typically perform fine, as the next value
configuration entry should be free unless someone manually assigned
worst case scenario is that we have to go through a large block of
was manually assigned, which will be helped by an equality index.
this case should be rare.
For efficiency in the case that we have to go through a large block of
assigned values, I wanted to reuse a previously allocated pblock
allocating one for each search. This required me to export a new
function that re-initializes a pblock so it can be reused.
Platforms tested: Fedora 8 x86_64
Flag Day: no
Doc impact: Yes. We need to doc the new slapi_pblock_init() function in
the plug-in guide.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3254 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/389-devel/attachments/20080805/fb2f35b0/attachment.bin
More information about the 389-devel