HACK: Track goroutine IDs to determine when we write by the wrong thread

To use: set `DENDRITE_TRACE_SQL=1` then grep for `unsafe`
This commit is contained in:
Kegan Dougal 2020-09-01 19:10:57 +01:00
parent a9f4d83d30
commit bfecc8e0e9
5 changed files with 233 additions and 6 deletions

View file

@ -43,4 +43,6 @@ type Writer interface {
// Queue up one or more database write operations within the
// provided function to be executed when it is safe to do so.
Do(db *sql.DB, txn *sql.Tx, f func(txn *sql.Tx) error) error
Safe() string
}