[Fedora-directory-devel] Please Review: (457951) Range search shouldn't be used when a DNA prefix is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=457951
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 are strictly integers, but the DNA plug-in supports a prefix to the integer portion of the
 value (such as "user1 - user1000").
Reviewed by: ???
Files: see diff
Branch: HEAD
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, we iterate through each value in the range until we either find a free value, or hit the end of the range. This will typically perform fine, as the next value in the configuration entry should be free unless someone manually assigned it. The worst case scenario is that we have to go through a large block of values that was manually assigned, which will be helped by an equality index. Even so,
 this case should be rare.

For efficiency in the case that we have to go through a large block of manually assigned values, I wanted to reuse a previously allocated pblock instead of allocating one for each search. This required me to export a new public SLAPI
 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.
https://bugzilla.redhat.com/attachment.cgi?id=313468&action=diff

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Fedora-directory-devel mailing list
Fedora-directory-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux