From d4ece2dcc34dafd917b1bb7ca5c75fd61453f759 Mon Sep 17 00:00:00 2001 From: Sorawis Nilparuk Date: Wed, 9 Jul 2025 10:37:27 -0700 Subject: [PATCH] add a comment --- internal/db/schema/internal/postgres/postgres.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/db/schema/internal/postgres/postgres.go b/internal/db/schema/internal/postgres/postgres.go index c3e6df1af6..afc4daeeaa 100644 --- a/internal/db/schema/internal/postgres/postgres.go +++ b/internal/db/schema/internal/postgres/postgres.go @@ -208,6 +208,9 @@ func (p *Postgres) RollbackRun(ctx context.Context) error { defer func() { p.tx = nil }() + + // p.tx is set to nil after the commit so if p.tx == nil, we assume that the transaction has + // already been committed and do nothing if p.tx == nil { return nil }