Skip to content

Fix deadlock issue between hivemind and hafbe during simultaneous context attachment

Marcin requested to merge mi_node_dead_lock into develop

Resolved a deadlock issue occurring on haf_api_node between hivemind and hafbe when both applications attempt to attach contexts simultaneously. The deadlock was triggered by conflicting locks on the hive.contexts_attachment table. RowExclusive lock was initiated during table updates, conflicting with an existing SHARE lock used by the second application to synchronize reversible block data removal by hived.

Changed the SHARE lock to a ROW SHARE lock to avoid collision with RowExclusive locks while ensuring it still collides with the EXCLUSIVE lock used by hived.

Merge request reports