[ARVADOS] updated: 1.3.0-2605-gc36d5cb91

Git user git at public.arvados.org
Tue May 26 19:13:36 UTC 2020


Summary of changes:
 services/api/lib/refresh_permission_view.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

       via  c36d5cb91099d79184b85388829d637f842be34e (commit)
      from  a5c857c5ab354d3b0e6a51653d0f1f21c108e131 (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 c36d5cb91099d79184b85388829d637f842be34e
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue May 26 15:12:56 2020 -0400

    16007: refresh_trashed uses a transaction
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/api/lib/refresh_permission_view.rb b/services/api/lib/refresh_permission_view.rb
index c0d5c1b69..826c44c3b 100644
--- a/services/api/lib/refresh_permission_view.rb
+++ b/services/api/lib/refresh_permission_view.rb
@@ -19,9 +19,11 @@ from users, lateral search_permission_graph(users.uuid, 3) as g where g.val > 0
 end
 
 def refresh_trashed
+  ActiveRecord::Base.transaction do
     ActiveRecord::Base.connection.execute("LOCK TABLE #{TRASHED_GROUPS}")
-  ActiveRecord::Base.connection.execute("DELETE FROM #{TRASHED_GROUPS}")
-  ActiveRecord::Base.connection.execute("INSERT INTO #{TRASHED_GROUPS} select * from compute_trashed()")
+    ActiveRecord::Base.connection.execute("DELETE FROM #{TRASHED_GROUPS}")
+    ActiveRecord::Base.connection.execute("INSERT INTO #{TRASHED_GROUPS} select * from compute_trashed()")
+  end
 end
 
 def update_permissions perm_origin_uuid, starting_uuid, perm_level, check=false

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list