fix: INFRA-1562 optimize prisma adapter for big queries#7464
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 36 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4d7ef77 to
163edc2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 163edc27df
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const parts = await Promise.all(chunkedQueries.map(chunkQuery => model.findMany(chunkQuery))) | ||
| return parts.flat() |
There was a problem hiding this comment.
Preserve NOT semantics when chunking large filters
_findManyWithChunking always merges chunked queries with a union (parts.flat()), which changes semantics for negative predicates. For example, splitting where: { NOT: { id: { in: [...] } } } into chunks and unioning results returns (NOT chunk1) OR (NOT chunk2) instead of the required (NOT chunk1) AND (NOT chunk2), so large NOT ... in filters can match far too many rows. This path is now used by every-style relationship processing, so large inputs can produce incorrect query results.
Useful? React with 👍 / 👎.
|
❌ The last analysis has failed. |
No description provided.