Skip to content

Commit

Permalink
annotate the error
Browse files Browse the repository at this point in the history
Signed-off-by: Leavrth <[email protected]>
  • Loading branch information
Leavrth committed Dec 8, 2023
1 parent 7ead7cd commit d8a333f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions br/pkg/restore/systable_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ func (rc *Client) RestoreSystemSchemas(ctx context.Context, f filter.Filter) err
logutil.ShortError(err),
zap.Stringer("table", tableName),
)
return errors.Trace(err)
return errors.Annotatef(err, "error during merging temporary tables into system tables, table: %s", tableName)
}
tablesRestored = append(tablesRestored, tableName.L)
}
}
err := rc.afterSystemTablesReplaced(ctx, tablesRestored)
return errors.Trace(err)
if err := rc.afterSystemTablesReplaced(ctx, tablesRestored); err != nil {
return errors.Annotate(err, "error during extra works after system tables replaced")
}
return nil
}

// database is a record of a database.
Expand Down

0 comments on commit d8a333f

Please sign in to comment.