mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
🐛 Bug Report: Possible race condition when using Postgres #153
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ItalyPaleAle on GitHub.
Reproduction steps
This CI test failed because the Pocket ID binary crashed due to a data race.
The test succeeded on 2nd attempt, indicating some flakiness.
It seems that the data race is in the Gorm library, but there may be something we can do in Pocket ID itself to prevent them.
Opening this issue so I can look into it later.
Expected behavior
Should not have data races
Actual Behavior
Data race causes the binary to crash during test
Version and Environment
main
Log Output
backend.log
@ItalyPaleAle commented on GitHub:
This really seems an issue upstream. I've opened go-gorm/gorm#7539
Will close this issue. When it's fixed, I'll update Pocket ID
@ItalyPaleAle commented on GitHub:
It happened once in a test (which is not unusual for race conditions). I will take another look, it's not even clear if the bug is in our code or in gorm (the goroutine that crashed was gorm's).
@kmendell commented on GitHub:
@ItalyPaleAle did you want to look at this, elias nor i can reproduce it.