On Mon, 2011-10-17 at 17:54 +0200, Jakub Hrozek wrote:
> On Mon, Oct 17, 2011 at 10:22:07AM -0400, Stephen Gallagher wrote:
> > On Mon, 2011-10-17 at 13:26 +0200, Jakub Hrozek wrote:
> > >
https://fedorahosted.org/sssd/ticket/1006
> > >
> > > Instead of saving each group as we fetch it from LDAP during initgroups,
> > > just build the membership diff in-memory and the perform three
> > > transactions:
> > > * save the groups if not cached already
> > > * save the intergroup memberships
> > > * save the user membership to his direct parents
> > >
> > > [PATCH 1/3] Utility functions for LDAP nested schema initgroups
> > > These will be used later on
> >
> > Nack.
> >
> > If the sysdb_transaction_commit() fails, you need to at least try to
> > call sysdb_transaction_cancel() (otherwise we could be left with a
> > transaction lock that we never free).
> >
>
> Done
>
> > >
> > > [PATCH 2/3] Use fewer transactions during RFC2307bis initgroups
> > > Save the groups to a hash table and save them in three transactions
> > > later
> > >
> >
> > Nack.
> >
> > Instead of using three separate transactions in
> > sdap_initgr_rfc2307bis_done(), wrap the save_* calls in a new outer
> > transaction. Then they'll only get written to disk once with all the
> > data.
> >
> > So just call sysdb_transaction_start() before save_rfc2307bis_groups()
> > and then call sysdb_transaction_commit() before tevent_req_done(); (And
> > obviously handle errors and cancel the outer transaction as needed).
>
> Done. I wasn't sure if this was safe, so I opted to write the groups on
> the disk first to be sure memberships are computed correctly.
>
> >
> >
> >
> > > [PATCH 3/3] Use fewer transactions during IPA initgroups
> > > No need for a hash table because we can grab all the groups in a single
> > > request. Just save them in a way similar to RFC2307bis initgroups
> >
> > Same comment about transactions as patch 2.
> >
>
> Done.
>
> > Otherwise, these look good.
>
> New patches attached
Ack to all three.