Commit ef7c47ff authored by Grzegorz Bizon's avatar Grzegorz Bizon

Reset database load balancing session before processing builds queue

parent 694a0195
......@@ -28,6 +28,18 @@ module EE
end
end
def retrieve_queue(queue_query_proc)
if ::Feature.enabled?(:ci_runner_builds_queue_on_replicas, runner, default_enabled: :yaml)
##
# We want to reset a load balancing session to discard the side
# effects of writes that could have happened prior to this moment.
#
::Gitlab::Database::LoadBalancing::Session.clear_session
end
super
end
def builds_for_shared_runner
return super unless shared_runner_build_limits_feature_enabled?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment