Huge Int value in `upsert` causes: "PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87"
See original GitHub issueUPDATE: I can reproduce this error consistently. It happens after sending quite high volume to Prisma. Nested upserts. It only starts to show after a few minutes. Happening both locally and on our deployed servers.
Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions
Name | Version |
---|---|
Node | v14.15.3 |
OS | darwin |
Prisma Client | 3.0.2 |
Query Engine | 0.1.0 |
Database | postgresql |
What happened: I was sending a high volume of upserts to Prisma. I can send the schema in private if needed.
Logs
prisma:client:fetcher how you used Prisma Client in the issue.
prisma:client:fetcher
prisma:client:fetcher at LibraryEngine.logger (project/db/node_modules/@prisma/client/runtime/index.js:25007:32)
prisma:client:fetcher at project/db/node_modules/@prisma/client/runtime/index.js:24977:36
prisma:client:libraryEngine sending request, this.libraryStarted: true
Client Snippet
// PLEASE FILL YOUR CODE SNIPPET HERE
Schema
I can send the schema in private if needed.
// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE
Prisma Engine Query
{"X":{}}
Issue Analytics
- State:
- Created 2 years ago
- Comments:27 (10 by maintainers)
Top Results From Across the Web
How to INSERT If Row Does Not Exist (UPSERT) in MySQL
Notice that we're using normal UPDATE syntax (but excluding the unnecessary table name and SET keyword), and only assigning the non-UNIQUE values. Also, ......
Read more >Upsert in SQL: What is an upsert, and when should you use ...
In this example, the primary key value of 2 already exists in the table, so the UPSERT operation updated that row with the...
Read more >math/big - Go Packages
Package big implements arbitrary-precision arithmetic (big numbers). ... The zero value for an Int, Rat, or Float correspond to 0. Thus, new values...
Read more >Documentation: 15: 8.1. Numeric Types - PostgreSQL
bigint, 8 bytes, large-range integer, -9223372036854775808 to +9223372036854775807 ; decimal, variable, user-specified precision, exact, up to 131072 digits ...
Read more >decimal — Decimal fixed point and floating point arithmetic ...
The usual start to using decimals is importing the module, viewing the current context with getcontext() and, if necessary, setting new values for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
3.15 will ship a change that returns a structured error for over or underflowing integers instead of a panic.
@janpio Example: https://github.com/gleuch/prisma-panic-example