On Thu, 2012-12-20 at 08:28 -0500, Simo Sorce wrote:
On Thu, 2012-12-20 at 14:05 +0100, Ondrej Kos wrote:
>
>
> Here are two patches for the SYSDB:
>
>
> [PATCH 1/2] SYSDB: replace ghost users properly
>
> this fixes
https://fedorahosted.org/sssd/ticket/1714
It seem that here you are basically scanning the whole attribute.
Instead of making potentially multiple deletes then wouldn't it be
easier to recompute the attribute and do a single replace omitting the
names you do not want in there?
I think you can significantly reduce the amount of linear searches as
the current patch introduces O(n^2) like behavior (nested linear loops).
Ok scrap this suggestion, I did not understand the patch and Ondrej
explained it to me in private.
However now that I understood what problem we are trying to solve here I
am afraid this work can be simply doen with adding a control named
LDB_CONTROL_PERMISSIVE_MODIFY_OID available in ldb by default.
It will cause a deletion of a missing value to not return errors.
Simo.
--
Simo Sorce * Red Hat, Inc * New York