Skip to content

Perform health check updates in an ordered manner

Sami Hiltunen requested to merge smh-ordered-health-updates into master

This updates the HealthManager to perform upserts into the node_status table in an ordered manner. This ensures concurrent updates to the records will not deadlock due to the random lock acquisition order. Generally this is not a concern as each Praefect have their own records. During upgrades though, the new Praefect process shares its identity with the old Process and can perform concurrent health updates to the same record. Ordering the inserts thus prevents deadlocks from happening during an upgrade. Postgres would resolve the deadlock by allowing one query to proceed and aborting the other one. Thus, the impact should not be big but we should avoid deadlocking anyway.

Closes #3907 (closed)

Merge request reports