Skip to content

Fix intermittent merge errors due to replication lag

Stan Hu requested to merge sh-fix-sidekiq-mark-write-location into master

!42435 (merged) attempted to fix the problem, but it did not work because EE databaase load balancing is not enabled in Sidekiq. Since it is disabled, the load balancer code would never post the write location to Redis, so the code for checking whether to stick to the primary was not able to be used.

Since Sidekiq always uses the primary we can just use the main ActiveRecord connection to get the same information.

Relates to #247857 (closed)

Edited by Stan Hu

Merge request reports