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).

> 
> [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).



> [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.

Otherwise, these look good.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to