prisma query stuck at prisma.$transaction
ayame30 opened this issue · 0 comments
ayame30 commented
Describe the bug
for case prisma.$transaction([queryA, queryB])
, if queryA was found in cache, queryB will stuck in transaction.
To Reproduce
Steps to reproduce the behavior:
async paginatedResult(skip: number) {
const [totalCount, result] = await this.prisma.$transaction([
this.prisma.article.count(),
this.prisma.article.findMany({ skip })
]);
return { totalCount, result };
}
- query with
paginatedResult(0)
- response 200 successfully, and result cached
- query with
paginatedResult(1)
- request freeze until timeout
Expected behavior
for case prisma.$transaction([queryA, queryB])
, return cached result if both queryA and queryB was found in cache, otherwise fetch from prisma.
Desktop (please complete the following information):
- OS: MacOS
- Browser: postman
- Version: ^4.8.0