From 82a6fbd928788298bcf761f51a24c8425986ce93 Mon Sep 17 00:00:00 2001 From: dongmen <414110582@qq.com> Date: Tue, 1 Nov 2022 14:16:04 +0800 Subject: [PATCH] address comments --- cdc/sink/mysql/mysql_syncpoint_store.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cdc/sink/mysql/mysql_syncpoint_store.go b/cdc/sink/mysql/mysql_syncpoint_store.go index 0c963601235..5da5176fcb4 100644 --- a/cdc/sink/mysql/mysql_syncpoint_store.go +++ b/cdc/sink/mysql/mysql_syncpoint_store.go @@ -243,10 +243,12 @@ func (s *mysqlSyncPointStore) SinkSyncPoint(ctx context.Context, s.syncPointRetention.Seconds()) _, err = tx.Exec(query) if err != nil { - // It is ok to ignore the error, since clear sync point is not necessary. + // It is ok to ignore the error, since it will not affect the correctness of the system, + // and no any business logic depends on this behavior, so we just log the error. log.Error("failed to clean syncpoint table", zap.Error(cerror.WrapError(cerror.ErrMySQLTxnError, err))) + } else { + s.lastCleanSyncPointTime = time.Now() } - s.lastCleanSyncPointTime = time.Now() } err = tx.Commit()