From dd9620ac9b9103ed610bedf07f6a8385f05db75a Mon Sep 17 00:00:00 2001 From: Ping Yu Date: Mon, 4 Mar 2024 23:08:40 +0800 Subject: [PATCH] polish Signed-off-by: Ping Yu --- cdc/cdc/sink/tikv.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cdc/cdc/sink/tikv.go b/cdc/cdc/sink/tikv.go index d0fa906d..968d2ed7 100644 --- a/cdc/cdc/sink/tikv.go +++ b/cdc/cdc/sink/tikv.go @@ -434,7 +434,9 @@ func (k *tikvSink) runWorker(ctx context.Context, workerIdx uint32) error { } continue } - _ = batcher.Append(e.rawKVEntry) // TODO: handle error + if err := batcher.Append(e.rawKVEntry); err != nil { + return errors.Trace(err) + } if batcher.ByteSize() >= defaultTiKVBatchBytesLimit { if err := flushToTiKV(); err != nil {