Yair Zaslavsky has posted comments on this change. Change subject: aaa: Fix sync ......................................................................
Patch Set 1: Hi, please see my answers - > Hi, > > Cannot say I understand the code... but please confirm: > > 1. you fetch all users with non recursive, update the users entries in > database, during this sequence you store the groups within cache. You are correct about the first part - however, I cannot update the users in db at this point - the reason is that users contain also group names and group ids, so I would rather perforom the sync for the groups first. > > 2. you fetch all groups ids from database that do not exist in the cache and > query these with no groups, so we complete the cache. Hmm, why should i do that? if the groups are not in the cache, they are detached from users, why should I sync them? > > 3. you go over group cache and resolve groups, each group that is resolved is > marked. > > 4. you keep doing (3) for these that are not marked, you can use two maps or > something as well. > Yes, but actually - if at first you have first level groups , and then you fetch resurivesly for them, you have all the required groups. > anyway... if I think of it... we have a problem... as provide should tell the > sync logic if to do recursive or not, as return 1st level of user and/or 1st > level of group may be recursive anyway, so we do not need to ask... we may > need to add capabilities flags to context if that sounds logical. anyway... if I think of it... we have a problem... as provide should tell the sync logic if to do recursive or not, as return 1st level of user and/or 1st level of group may be recursive anyway, Why? do u think some external provider will behave this way and when asked for a group it will fetch also recurisve? -- To view, visit http://gerrit.ovirt.org/28561 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id49b51517a967c7a83e8e73f52181673baa31700 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-HasComments: No _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches