Select Git revision
An error occurred while fetching branches. Retry the search.
build.rb
Forked from
GitLab.org / GitLab
Source project has a limited visibility.
-
Bob Van Landuyt authored
This sets the data_consistency for the Ci::ArchiveTraceWorker to sticky. Allowing the read queries before any write to be handled by a replica. The job is scheduled from the Ci::BuildFinishedWorker with some delay built in. Which means this job can take the 0.8s wait in the beginning, and is very likely to find a replica that is up to date with the WAL locations at the time of scheduling. To increase the effect of this, this also preloads some associations in the worker. That way, we can take advantage of loading them from a replica rather than doing it lazily from the primary.
Bob Van Landuyt authoredThis sets the data_consistency for the Ci::ArchiveTraceWorker to sticky. Allowing the read queries before any write to be handled by a replica. The job is scheduled from the Ci::BuildFinishedWorker with some delay built in. Which means this job can take the 0.8s wait in the beginning, and is very likely to find a replica that is up to date with the WAL locations at the time of scheduling. To increase the effect of this, this also preloads some associations in the worker. That way, we can take advantage of loading them from a replica rather than doing it lazily from the primary.