X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d9fdb9630e56f3ccdaee6acd8b1ca4cdbdf11b0a..bc882be0f75601397fedb7ad16d3540df015256f:/services/api/app/controllers/arvados/v1/containers_controller.rb diff --git a/services/api/app/controllers/arvados/v1/containers_controller.rb b/services/api/app/controllers/arvados/v1/containers_controller.rb index b06d65a36c..b7dc030229 100644 --- a/services/api/app/controllers/arvados/v1/containers_controller.rb +++ b/services/api/app/controllers/arvados/v1/containers_controller.rb @@ -28,14 +28,6 @@ class Arvados::V1::ContainersController < ApplicationController show end - def update - # Lock containers table to avoid deadlock in cascading priority update (see #20240) - Container.transaction do - ActiveRecord::Base.connection.execute "LOCK TABLE containers IN EXCLUSIVE MODE" - super - end - end - def find_objects_for_index super if action_name == 'lock' || action_name == 'unlock' @@ -61,13 +53,8 @@ class Arvados::V1::ContainersController < ApplicationController end def update_priority - # Lock containers table to avoid deadlock in cascading priority update (see #20240) - Container.transaction do - ActiveRecord::Base.connection.execute "LOCK TABLE containers IN EXCLUSIVE MODE" - @object.reload(lock: true) - @object.update_priority! - show - end + @object.update_priority! + show end def current