-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add retry logic for concurrency sensitive database transactions
When the MCP Server inserts rows into the `Tasks` table, it holds a lock on the table primary key index. When the MCP Client updates existing tasks to set their start time, it does the same. If these transactions overlap, MySQL may detect this condition as a deadlock and abort one the transactions with a retriable/retryable(?!) exception. To handle this, we can retry the failed transaction after a short wait. It should always succeed eventually. Addresses issue #1198
- Loading branch information
1 parent
d3fc3b5
commit 98052fb
Showing
3 changed files
with
71 additions
and
39 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