Sync-diff-inspector Validation Data Abnormal Exit

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: sync-diff-inspector校验数据异常退出

| username: 小气鬼1105

Version: V6.1.0
Data verification scenario: upstream MySQL, downstream TiDB
When an exception occurs, the process exits directly with the following error:
[2022/09/05 15:22:41.234 +08:00] [ERROR] [utils.go:681] [“there is no row in result set”] [stack="github.com/pingcap/tidb-tools/sync_diff_inspector/utils.GetApproximateMidBySize
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/utils/utils.go:681
main.(*Diff).binSearch
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:512
main.(*Diff).BinGenerate
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:496
main.(*Diff).consume
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:435
main.(*Diff).Equal.func2
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:284
github.com/pingcap/tidb-tools/sync_diff_inspector/utils.(*WorkerPool).

How to configure if there is a varchar primary key in the table?
Before data comparison, pay attention to the collation settings in the table. If the primary key or unique key in the table is of varchar type and the collation settings in the upstream and downstream databases are different, the final verification result may be incorrect due to sorting issues. You need to add collation settings in the sync-diff-inspector configuration file.

I didn’t understand this sentence, requesting support from experts.

| username: xfworld | Original post link

Collation can be case-sensitive or case-insensitive, and of course, the comparison results will be different.

You can refer to the configuration file.

| username: 小气鬼1105 | Original post link

Is this collation configured for a specific column in the table as a validation column? In other words, you specify the column name, not use the varchar primary key column for validation.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.