-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): fix deadlock in runMutation and txn.Update() (#9085)
We call txn.Update() once the transaction has finished. This moves all the uncommited posting lists to a delta map in the txn. This can cause a deadlock with runMutation. Mostly we have seen it when a transaction has a timeout. RunMutation keeps on going, while txn.Update() gets triggered. This PR fixes it by not calling txn.Update() if the transaction has failed. We would futher look into cancelling runMutation at that time too. Fixes: https://linear.app/hypermode/issue/DGR-477/dgraph-v24-alpha-2-hangs --------- Co-authored-by: ShivajiKharse <[email protected]> Co-authored-by: shivaji-dgraph <[email protected]>
- Loading branch information
1 parent
c437860
commit d3d9c5b
Showing
6 changed files
with
121 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters