log rollback errors
This commit is contained in:
parent
64a380fce3
commit
50d15e32c0
@ -332,14 +332,18 @@ func (x *msgIndex) processHeadChanges(ctx context.Context) error {
|
||||
for _, hc := range pend {
|
||||
for _, ts := range hc.rev {
|
||||
if err := x.doRevert(ctx, tx, ts); err != nil {
|
||||
tx.Rollback() //nolint
|
||||
if err := tx.Rollback(); err != nil {
|
||||
log.Errorf("error rolling back transaction: %s", err)
|
||||
}
|
||||
return xerrors.Errorf("error reverting %s: %w", ts, err)
|
||||
}
|
||||
}
|
||||
|
||||
for _, ts := range hc.app {
|
||||
if err := x.doApply(ctx, tx, ts); err != nil {
|
||||
tx.Rollback() //nolint
|
||||
if err := tx.Rollback(); err != nil {
|
||||
log.Errorf("error rolling back transaction: %s", err)
|
||||
}
|
||||
return xerrors.Errorf("error applying %s: %w", ts, err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user