-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: latest: true version disappear on parallel writes (#9032)
What? Fixes issue when on parallel writes in result you can have 0 latest: true versions. Why? There must be always a version with latest: true How? Ensures that we always have a version with latest: true by adding a filter on createdAt < createdVersion.createdAt. Instead, this ponentially can lead to a situation where we have 2 versions with latest: true, if they were created at the exact same time, but this shouldn't happen in a real world scenario and it's much less problematic than not having a version with latest: true. Fixes #5895 Changes from #8986 --------- Co-authored-by: Sasha <64744993+r1tsuu@users.noreply.github.com>
- Loading branch information
1 parent
c5fe021
commit 631edd4
Showing
3 changed files
with
114 additions
and
1 deletion.
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