API: `jobs/request`: ensure that BIG QUERY always runs on replicas
As part of looking at this #324367 (comment 529157009), it appears that small amount of BIG QUERY is being executed on primary instead of replica.
It appears that this is likely to some write happening early before an actual call is being made. Can this be Runner#heartbeat
? The heartbeat periodically persists data to database, which changes the connection to use primary
for the rest of request. This makes for in-frequently used runners to always execute them using primary
due to updates.
This would explain the https://log.gprd.gitlab.net/goto/833584214ef74550c1b07649c8c8280e.
Edited by Kamil Trzciński