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

Pluck panics in a busy connection and canceled context #6840

Open
alimoli opened this issue Feb 19, 2024 · 0 comments
Open

Pluck panics in a busy connection and canceled context #6840

alimoli opened this issue Feb 19, 2024 · 0 comments
Assignees
Labels
type:with reproduction steps with reproduction steps

Comments

@alimoli
Copy link

alimoli commented Feb 19, 2024

GORM Playground Link

go-gorm/playground#694

Description

Pluck panics in a busy connection and canceled context, probably due to concurrency.

According to ChatGPT:

In Go, the database/sql package, which is used by the PostgreSQL driver, does not support concurrent execution of statements on the same transaction across multiple goroutines. Each transaction should be confined to a single goroutine.
Attempting to use a single transaction across multiple goroutines can lead to unpredictable behavior, including errors like "conn busy" or "unexpected EOF". This is because the database/sql package is not designed to handle concurrent access to the same transaction object.

@github-actions github-actions bot added the type:with reproduction steps with reproduction steps label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:with reproduction steps with reproduction steps
Projects
None yet
Development

No branches or pull requests

2 participants