Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
Signed-off-by: jiefenghuang <[email protected]>
  • Loading branch information
jiefenghuang committed Dec 26, 2024
1 parent 4304d4d commit 482b5af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/meta/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 482b5af

Please sign in to comment.