tidb icon indicating copy to clipboard operation
tidb copied to clipboard

mysql-test(filesort_merge) failed.

Open wjhuang2016 opened this issue 2 years ago • 2 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_integration_common_test/detail/tidb_ghpr_integration_common_test/12349/pipeline 0qFY5iWCvW

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master

wjhuang2016 avatar Aug 09 '22 05:08 wjhuang2016

[2022/08/10 14:07:17.734 +08:00] [INFO] [handle.go:1189] ["[stats] directly update count"] [tableID=91] [results.Count=2373] [count=2373]
[2022/08/10 14:07:18.005 +08:00] [INFO] [analyze.go:426] ["analyze table `filesort_merge`.`t1` has finished"] [partition=] ["job info"="analyze table all columns with 256 buckets, 500 topn, 1 samplerate"] ["start time"=2022/08/10 14:07:17.715 +08:00] ["end time"=2022/08/10 14:07:17.980 +08:00] [cost=265.736394ms]
[2022/08/10 14:07:22.272 +08:00] [INFO] [manager.go:296] ["get owner"] ["owner info"="[log-backup] /tidb/br-stream/owner ownerManager e451b3b2-6623-4ab7-b4ae-754a5e9c9aa8"] [ownerID=e451b3b2-6623-4ab7-b4ae-754a5e9c9aa8]
[2022/08/10 14:07:26.845 +08:00] [INFO] [data_window.go:248] ["Error exists when getting the SQL Metric."]
[2022/08/10 14:07:32.551 +08:00] [INFO] [update.go:1133] ["[stats] auto analyze triggered"] [sql="analyze table `filesort_merge`.`t1`"] [reason="too many modifications(3072/2373>0.5)"]

From log we can find that 2373 is directly returned by analyze response Count from TiKV. A possibility root cause is about to txn isolation level.

The default isolation level is RC as following: https://github.com/pingcap/tidb/blob/8e77ce264c7286fd592709d8e625459fd04a7351/distsql/request_builder.go#L160-L171

and the testcase failed about 5 or 6 times once. After I changed it into SI, the testcase success 20 times in a row on my local env.

Yisaer avatar Aug 10 '22 08:08 Yisaer

As the tikv analyze response returned wrong value, I transfer this issue into https://github.com/tikv/tikv/issues/13258

Yisaer avatar Aug 11 '22 08:08 Yisaer

I will close this issue as it seems we won't see this error in mysql-test now. Further information will be tracked in https://github.com/tikv/tikv/issues/13258

Yisaer avatar Aug 15 '22 09:08 Yisaer