Commit 2a091a18 authored by Marcin's avatar Marcin
Browse files

Fix deadlock issue between hivemind and hafbe during simultaneous context attachment

Resolved a deadlock issue occurring onn 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.
parent f2cec24d
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment