Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
github.com/pierrec/lz4/v4 v4.1.21
github.com/pingcap/errors v0.11.5-0.20250523034308-74f78ae071ee
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
github.com/pingcap/kvproto v0.0.0-20251109100001-1907922fbd18
github.com/pingcap/kvproto v0.0.0-20251218093338-9f0ac2fc9a1a
github.com/pingcap/log v1.1.1-0.20250917021125-19901e015dc9
github.com/pingcap/sysutil v1.0.1-0.20240311050922-ae81ee01f3a5
github.com/pingcap/tidb v1.1.0-beta.0.20251121075944-8f2630e53d5d
Expand All @@ -66,7 +66,7 @@ require (
github.com/spf13/pflag v1.0.7
github.com/stretchr/testify v1.11.1
github.com/thanhpk/randstr v1.0.6
github.com/tikv/client-go/v2 v2.0.8-0.20251112113123-1264c1278595
github.com/tikv/client-go/v2 v2.0.8-0.20260605035552-78dc334b882b

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is not the latest client-go commit on the release-nextgen-202603 branch?

@cfzjywxk cfzjywxk Jun 5, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wfxr It is desigend to not use the latest one to minialize the change risk for ticdc, the branch https://github.com/tikv/client-go/tree/release-nextgen-202603-ticdc is used

github.com/tikv/pd v1.1.0-beta.0.20240407022249-7179657d129b
github.com/tikv/pd/client v0.0.0-20250901035025-22b7ce6d4993
github.com/tinylib/msgp v1.5.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2140,8 +2140,8 @@ github.com/pingcap/fn v1.0.0/go.mod h1:u9WZ1ZiOD1RpNhcI42RucFh/lBuzTu6rw88a+oF2Z
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E=
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w=
github.com/pingcap/kvproto v0.0.0-20251109100001-1907922fbd18 h1:ZgebBNwgma8INCfexAX8dfqZo7TWQrvMXHGABEmAY2Y=
github.com/pingcap/kvproto v0.0.0-20251109100001-1907922fbd18/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
github.com/pingcap/kvproto v0.0.0-20251218093338-9f0ac2fc9a1a h1:uGZ0XGBMtcJTmh+6mlpF/SCRZhJXOPES7lx0oY3NBas=
github.com/pingcap/kvproto v0.0.0-20251218093338-9f0ac2fc9a1a/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8=
github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM=
github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
Expand Down Expand Up @@ -2348,8 +2348,8 @@ github.com/tidwall/rtred v0.1.2 h1:exmoQtOLvDoO8ud++6LwVsAMTu0KPzLTUrMln8u1yu8=
github.com/tidwall/rtred v0.1.2/go.mod h1:hd69WNXQ5RP9vHd7dqekAz+RIdtfBogmglkZSRxCHFQ=
github.com/tidwall/tinyqueue v0.1.1 h1:SpNEvEggbpyN5DIReaJ2/1ndroY8iyEGxPYxoSaymYE=
github.com/tidwall/tinyqueue v0.1.1/go.mod h1:O/QNHwrnjqr6IHItYrzoHAKYhBkLI67Q096fQP5zMYw=
github.com/tikv/client-go/v2 v2.0.8-0.20251112113123-1264c1278595 h1:FbQU6n+neYgeeU7jFW2i8g7M03xSfVRdOSNmb/FmKMI=
github.com/tikv/client-go/v2 v2.0.8-0.20251112113123-1264c1278595/go.mod h1:ZLHQiuG/o3JHzMuE7dT2GnGCf+SPxUNbcr6farUsU18=
github.com/tikv/client-go/v2 v2.0.8-0.20260605035552-78dc334b882b h1:fsHKjA0lkqQSoo9SzNN3Hu918fyw+NFSM/RHf/U5VBs=
github.com/tikv/client-go/v2 v2.0.8-0.20260605035552-78dc334b882b/go.mod h1:bXoQc3Fv0S3TGGUQ4T5cjzJ6upBxZE1JAzMpIfibttI=
github.com/tikv/pd v1.1.0-beta.0.20240407022249-7179657d129b h1:t2XoZp4UHrkPpYPsxbRTRVExJnriWlh+ZsDIfpYyd98=
github.com/tikv/pd v1.1.0-beta.0.20240407022249-7179657d129b/go.mod h1:7HJMdb0O5umNpZIFt8e/wKAcEmH99n2HsYgXX+vZj3k=
github.com/tikv/pd/client v0.0.0-20250901035025-22b7ce6d4993 h1:3YlTVl4n/u9oWpt6O5d28XA6Lm73CbVQS2to8O/KWqE=
Expand Down
12 changes: 12 additions & 0 deletions pkg/sink/mysql/progress_table_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
package mysql

import (
"cmp"
"context"
"database/sql"
"fmt"
"slices"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -99,6 +101,16 @@ func (w *ProgressTableWriter) Flush(checkpoint uint64) error {
if len(tableNames) == 0 {
return nil
}
// TableSchemaStore stores table names in maps, so the returned order is not

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a strict order here, so we don't need to make this change.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used to make the flaky test TestProgressTableWriterFlush stable, should we keep the change to avoid the current flaky tests or to change the test case? What do you think?

// stable across runs. The progress table is keyed by table identity and the
// writes are idempotent, but deterministic order keeps batch boundaries and
// SQL arguments reproducible for tests and debugging.
slices.SortFunc(tableNames, func(a, b *event.SchemaTableName) int {
if c := cmp.Compare(a.SchemaName, b.SchemaName); c != 0 {
return c
}
return cmp.Compare(a.TableName, b.TableName)
})

if err := w.initProgressTable(w.ctx); err != nil {
return err
Expand Down