calling findUnique concurrently on a model with a compound unique constraint causes it to return null #15934
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: extendedWhereUnique
Preview Feature
topic: findUnique()
topic: previewFeatures
Issue touches on an preview feature flag
Milestone
Bug description
This bug occurs when running multiple
findUnique
queries with another non unique value (extendedWhereUnique
) concurrently on a model with a compound unique constraint. It causes prisma to return null instead of the record.findUnique
with the unique field and another non unique field@@unique()
constraintfindUnique
queries are run concurrentlydeletedAt: { not:null }
, we get the following rust error : tokio-runtime-worker' panicked at 'calledOption::unwrap()
on aNone
value', query-engine\core\src\response_ir\mod.rs:55:43How to reproduce
I have made a repo with a reproduction here: https://github.com/MichaelB-99/prisma-bug-reproduction.
Expected behavior
That findUnique returns the record regardless of if it is run concurrently or not
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: