diff --git a/pkg/meta/sql.go b/pkg/meta/sql.go index cdbe46a52746..e689959e5186 100644 --- a/pkg/meta/sql.go +++ b/pkg/meta/sql.go @@ -840,6 +840,9 @@ func (m *dbMeta) txn(f func(s *xorm.Session) error, inodes ...Ino) error { if eno, ok := err.(syscall.Errno); ok && eno == 0 { err = nil } + if err != nil { + logger.Warnf("Transaction failed: %s", err) + } if err != nil && m.shouldRetry(err) { m.txRestart.Add(1) logger.Debugf("Transaction failed, restart it (tried %d): %s", i+1, err)