// FlushRowChangedEvents will flush all received events, we don't allow mysql
// sink to receive events before resolving
FlushRowChangedEvents will flush all received events, we don't allow mysql
sink to receive events before resolving
// FlushRowChangedEvents will flush all received events we don ' t allow mysql // sink to receive events before resolving
func (s *mysqlSink) FlushRowChangedEvents(ctx context.Context, tableID model.TableID, resolvedTs uint64) (uint64, error) {
	v, ok := s.tableMaxResolvedTs.Load(tableID)
	if !ok || v.(uint64) < resolvedTs {
		s.tableMaxResolvedTs.Store(tableID, resolvedTs)
	}
	s.resolvedNotifier.Notify()
	select {
	case err := <-s.errCh:
		return 0, err
	default:
	}
	checkpointTs := s.getTableCheckpointTs(tableID)
	s.statistics.PrintStatus(ctx)
	return checkpointTs, nil
}
func ( s * mysqlSink ) FlushRowChangedEvents ( ctx context . Context , tableID model . TableID , resolvedTs uint64 ) ( uint64 , error ) { v , ok := s . tableMaxResolvedTs . Load ( tableID ) if ! ok || v . ( uint64 ) < resolvedTs { s . tableMaxResolvedTs . Store ( tableID , resolvedTs ) } s . resolvedNotifier . Notify ( ) select { case err := <- s . errCh : return 0 , err default : } checkpointTs := s . getTableCheckpointTs ( tableID ) s . statistics . PrintStatus ( ctx ) return checkpointTs , nil }
FlushRowChangedEvents will flush all received events, we don't allow mysql
sink to receive events before resolving
FlushRowChangedEvents will flush all received events we don ' t allow mysql sink to receive events before resolving
// Since CDC does not guarantee exactly once semantic, it won't cause any problem // here even if the table was moved or removed. // ref: https://github.com/pingcap/tiflow/pull/4356#discussion_r787405134 // check and throw error