-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed concurrency issue in saving large graphs of objects
it was possible that if object A was already being saved and object B required A.id, then it would take A.id before A was saved. This is now fixed such that all dependent objects strictly wait for their dependencies to be saved before attempting to get their ids. This happens even if the object is already being saved by another operation. (the promise is shared) On the other hand, we don't wait for all one to many objects for an object - which don't have a dependency relationship. These objects are added to a queue of objects that need to be saved before the top level object can be considered completely saved.
- Loading branch information
1 parent
c30c2de
commit 0c64d69
Showing
2 changed files
with
61 additions
and
16 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