Skip to content

Use primary DB for computing issuable updates

euko requested to merge 416207-use-primary-for-update-computations into master

What does this MR do and why?

Related to #416207 (closed)

Use the primary DB for computing issuable updates.

The DB load balancer switches to the primary when it detects a transaction or other statements that modify data or schema.

This behavior might lead to the issuable update services to read lagging data from a replica to compute the desired updated states.

While it's desirable to use a transaction in conjunction with locking to compute updates, the issuable services have not been designed to retroactively accommodate such change.

To ensure that the issuable services compute new states using the latest data, the update method is updated to switch to read from the primary from the beginning. This won't address the existing data race conditions but might abate them.

Edited by euko

Merge request reports