-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(storage): initialization race condition (#1944)
In the case that we get multiple method calls to storage in a very short time (say 3 that start at once), each will try to init at the same time since we only set `this.hasInitialized` to true after awaiting table creation. --------- Co-authored-by: Your Name <you@example.com>
- Loading branch information
1 parent
4526a78
commit 4a25be4
Showing
2 changed files
with
108 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@mastra/core': patch | ||
--- | ||
|
||
Fixed race condition when multiple storage methods attempt to initialize the db at the same time |
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