[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Read Committed transaction level for CockroachDB #24687

Open
kibertoad opened this issue Jul 2, 2024 · 0 comments
Open

Support Read Committed transaction level for CockroachDB #24687

kibertoad opened this issue Jul 2, 2024 · 0 comments
Labels
domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. kind/feature A request for a new feature. tech/engines Issue for tech Engines. topic: cockroachdb topic: $transaction Related to .$transaction(...) Client API

Comments

@kibertoad
Copy link
kibertoad commented Jul 2, 2024

Problem

CockroachDB 24.1+ supports using Read Committed transaction level. However, Prisma doesn't recognize that as a valid level either on a client or on a transaction level. Only Serializable is a valid option as of 5.16.1.

Suggested solution

  • Adjust TransactionIsolationLevel enum for CockroachDB to include ReadCommitted
  • Adjust SQL generation logic to work correctly with ReadCommitted, if necessary.

Alternatives

  • Support passing any transaction isolation level, and only throw an error if DB itself throws an error

Additional context

https://www.cockroachlabs.com/docs/stable/read-committed

@Weakky Weakky added kind/feature A request for a new feature. domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. tech/engines Issue for tech Engines. topic: cockroachdb topic: $transaction Related to .$transaction(...) Client API labels Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. kind/feature A request for a new feature. tech/engines Issue for tech Engines. topic: cockroachdb topic: $transaction Related to .$transaction(...) Client API
Projects
None yet
Development

No branches or pull requests

2 participants