[SSSD] [PATCHES] Drop-redundant-sysdb_ctx-parameter

Simo Sorce simo at redhat.com
Sat Nov 9 05:07:59 UTC 2013


On Fri, 2013-11-08 at 16:41 +0100, Michal Židek wrote:
> Hello,
> 
> these patches (made by Jakub and me) remove redundant sysdb_ctx 
> parameter from sysdb API in functions that are closely bound to some 
> domain (sss_domain_info already contains sysdb_ctx, so there is no need 
> to pass it as a separate parameter).

Looks ok, but please separate the patches that fix the names (last one
of the set) and one patch that includes removeal of unused functions in
separate patchset. Keep this one exclusively to handle the removal and
don't be tempted to sneak in any other change, because those will get
lost in the noise.

> NOTE:
> This is the first wave of sysdb refactoring effort. Other sysdb changes 
> will follow, including ticket
> https://fedorahosted.org/sssd/ticket/2129
> (Always store users with FQDN with hardcoded format), which is change 
> that should simplify handling of 'name' attribute and avoid code 
> patterns like this:
> 
> if (IS_SUBDOMAIN) {
>     parse name and domain part from 'name' attribute using
>     regular expression (requires initialization of names_ctx).
> } else {
>     'name' attribute contains only name
> }
> 
> In other words, we should store data in unified manner for main domains 
> as well as for subdomains and avoid the need for regular expressions 
> when simply need to parse name and domain portion from the 'name' 
> attribute. Alternatively we might store name and domain portions in 
> separate attributes instead of one FQDN attribute.

Separate attributes looks like it would be more robust, but then you
have to deal with potential name conflicts with subdomains, so you may
have little choice here, short of creating subtrees for subdomains.

Have you already thought about how to upgrade an existing DB ?
I am a bit concerned about all the renames, it may take a *lot* of time
if done at startup, and the DB is big, as a lot of indexes needs to be
fixed. Perhaps we can drop all indeces, do all renames and then rebuild
indeces ...

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list