()
| 666 | } |
| 667 | |
| 668 | func (s *State) rollbackHandler() { |
| 669 | if tx, ok := s.handler.(sqlTransaction); ok { |
| 670 | if err := tx.Rollback(); err != nil { |
| 671 | log.WithError(err).Fatal("failed to rollback") |
| 672 | } |
| 673 | } |
| 674 | // reset schema change flag |
| 675 | atomic.StoreUint32(&s.hasSchemaChange, 0) |
| 676 | } |
| 677 | |
| 678 | func (s *State) getLocalTime() time.Time { |
| 679 | return time.Now().UTC() |