Skip to content

Stale read on worker version creation

Example with this build in prod: https://arkindex.teklia.com/process/960c031d-8a9c-4131-8e48-5c0838d20e08/0

With a huge lag on the Postgres cluster, it could in theory be possible for the Revision to be missing from the read replica when the Git import task creates a WorkerVersion, causing this error.

We can avoid it with a .using('default') on the revision field of a WorkerVersionSerializer.