[ARVADOS] updated: 1.1.2-115-g1809dbb

Git user git at public.curoverse.com
Tue Jan 23 11:36:45 EST 2018


Summary of changes:
 services/fuse/arvados_fuse/fusedir.py | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

       via  1809dbb21b4cb65e0e141dd41d41a3516ef33ec5 (commit)
      from  0dcf9daff8fce376f20f125c3ef867333976c18c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 1809dbb21b4cb65e0e141dd41d41a3516ef33ec5
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Jan 23 11:33:58 2018 -0500

    12990: Re-query project roots in order to get full record
    
    Makes the query of all projects lighter.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/fuse/arvados_fuse/fusedir.py b/services/fuse/arvados_fuse/fusedir.py
index 43a3fa5..34fd594 100644
--- a/services/fuse/arvados_fuse/fusedir.py
+++ b/services/fuse/arvados_fuse/fusedir.py
@@ -1041,29 +1041,25 @@ class SharedDirectory(Directory):
                 all_projects = arvados.util.list_all(
                     self.api.groups().list, self.num_retries,
                     filters=[['group_class','=','project']],
-                    select=["uuid", "owner_uuid", "name"])
+                    select=["uuid", "owner_uuid"])
                 objects = {}
                 for ob in all_projects:
                     objects[ob['uuid']] = ob
 
                 roots = []
                 root_owners = set()
+                current_uuid = self.current_user['uuid']
                 for ob in all_projects:
-                    if ob['owner_uuid'] != self.current_user['uuid'] and ob['owner_uuid'] not in objects:
-                        roots.append(ob)
+                    if ob['owner_uuid'] != current_uuid and ob['owner_uuid'] not in objects:
+                        roots.append(ob['uuid'])
                         root_owners.add(ob['owner_uuid'])
 
                 lusers = arvados.util.list_all(
                     self.api.users().list, self.num_retries,
-                    filters=[['uuid','in', list(root_owners)]],
-                    select=["uuid", "first_name", "last_name"])
+                    filters=[['uuid','in', list(root_owners)]])
                 lgroups = arvados.util.list_all(
                     self.api.groups().list, self.num_retries,
-                    filters=[['uuid','in', list(root_owners)]],
-                    select=["uuid", "name"])
-
-                users = {}
-                groups = {}
+                    filters=[['uuid','in', list(root_owners)+roots]])
 
                 for l in lusers:
                     objects[l["uuid"]] = l
@@ -1081,10 +1077,11 @@ class SharedDirectory(Directory):
                         elif "first_name" in obr:
                             contents[u"{} {}".format(obr["first_name"], obr["last_name"])] = obr
 
-
                 for r in roots:
-                    if r['owner_uuid'] not in objects:
-                        contents[r['name']] = r
+                    if r in objects:
+                        obr = objects[r]
+                        if obr['owner_uuid'] not in objects:
+                            contents[obr["name"]] = obr
 
             # end with llfuse.lock_released, re-acquire lock
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list