[arvados] updated: 2.5.0-344-g25ded0f5c
git repository hosting
git at public.arvados.org
Tue Apr 4 15:19:06 UTC 2023
Summary of changes:
.../api/app/controllers/arvados/v1/container_requests_controller.rb | 4 ++--
services/api/app/controllers/arvados/v1/containers_controller.rb | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
via 25ded0f5c0b44dfcc97f945331487abf07a91feb (commit)
from 78910a657391081eb46b2b7a84d985b7daea6389 (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 25ded0f5c0b44dfcc97f945331487abf07a91feb
Author: Tom Clegg <tom at curii.com>
Date: Tue Apr 4 11:18:08 2023 -0400
20240: Change locking mode to EXCLUSIVE.
...in order to conflict with SELECT FOR UPDATE.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/api/app/controllers/arvados/v1/container_requests_controller.rb b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
index 86b4b6486..75f70b1a2 100644
--- a/services/api/app/controllers/arvados/v1/container_requests_controller.rb
+++ b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
@@ -32,7 +32,7 @@ class Arvados::V1::ContainerRequestsController < ApplicationController
def create
# Lock containers table to avoid deadlock in cascading priority update (see #20240)
Container.transaction do
- ActiveRecord::Base.connection.execute "LOCK TABLE containers IN SHARE ROW EXCLUSIVE MODE"
+ ActiveRecord::Base.connection.execute "LOCK TABLE containers IN EXCLUSIVE MODE"
super
end
end
@@ -40,7 +40,7 @@ class Arvados::V1::ContainerRequestsController < ApplicationController
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 SHARE ROW EXCLUSIVE MODE"
+ ActiveRecord::Base.connection.execute "LOCK TABLE containers IN EXCLUSIVE MODE"
super
end
end
diff --git a/services/api/app/controllers/arvados/v1/containers_controller.rb b/services/api/app/controllers/arvados/v1/containers_controller.rb
index 73701b92c..b06d65a36 100644
--- a/services/api/app/controllers/arvados/v1/containers_controller.rb
+++ b/services/api/app/controllers/arvados/v1/containers_controller.rb
@@ -31,7 +31,7 @@ class Arvados::V1::ContainersController < ApplicationController
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 SHARE ROW EXCLUSIVE MODE"
+ ActiveRecord::Base.connection.execute "LOCK TABLE containers IN EXCLUSIVE MODE"
super
end
end
@@ -63,7 +63,7 @@ class Arvados::V1::ContainersController < ApplicationController
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 SHARE ROW EXCLUSIVE MODE"
+ ActiveRecord::Base.connection.execute "LOCK TABLE containers IN EXCLUSIVE MODE"
@object.reload(lock: true)
@object.update_priority!
show
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list