Open hawkingrei opened 2 years ago
WARNING: DATA RACE
Write at 0x00c01a2fce80 by goroutine 210:
github.com/pingcap/tidb/table/tables_test.TestConstraintCheckForUniqueIndex.func1()
/go/tidb/table/tables/tables_test.go:706 +0xa4
Previous write at 0x00c01a2fce80 by goroutine 60:
github.com/pingcap/tidb/table/tables_test.TestConstraintCheckForUniqueIndex()
/go/tidb/table/tables/tables_test.go:714 +0x7cf
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
Goroutine 210 (running) created at:
github.com/pingcap/tidb/table/tables_test.TestConstraintCheckForUniqueIndex()
/go/tidb/table/tables/tables_test.go:704 +0x773
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
Goroutine 60 (finished) created at:
testing.(*T).Run()
/usr/local/go/src/testing/testing.go:1306 +0x726
testing.runTests.func1()
/usr/local/go/src/testing/testing.go:1598 +0x99
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.runTests()
/usr/local/go/src/testing/testing.go:1596 +0x7ca
testing.(*M).Run()
/usr/local/go/src/testing/testing.go:1504 +0x9d1
go.uber.org/goleak.VerifyTestMain()
/home/prow/go/pkg/mod/go.uber.org/goleak@v1.1.12/testmain.go:53 +0x59
github.com/pingcap/tidb/table/tables_test.TestMain()
/go/tidb/table/tables/main_test.go:31 +0x316
main.main()
_testmain.go:133 +0x264 WARNING: DATA RACE
Write at 0x00c01a2fce80 by goroutine 210:
github.com/pingcap/tidb/table/tables_test.TestConstraintCheckForUniqueIndex.func1()
/go/tidb/table/tables/tables_test.go:706 +0xa4
Previous write at 0x00c01a2fce80 by goroutine 60:
github.com/pingcap/tidb/table/tables_test.TestConstraintCheckForUniqueIndex()
/go/tidb/table/tables/tables_test.go:714 +0x7cf
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
Goroutine 210 (running) created at:
github.com/pingcap/tidb/table/tables_test.TestConstraintCheckForUniqueIndex()
/go/tidb/table/tables/tables_test.go:704 +0x773
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
Goroutine 60 (finished) created at:
testing.(*T).Run()
/usr/local/go/src/testing/testing.go:1306 +0x726
testing.runTests.func1()
/usr/local/go/src/testing/testing.go:1598 +0x99
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.runTests()
/usr/local/go/src/testing/testing.go:1596 +0x7ca
testing.(*M).Run()
/usr/local/go/src/testing/testing.go:1504 +0x9d1
go.uber.org/goleak.VerifyTestMain()
/home/prow/go/pkg/mod/go.uber.org/goleak@v1.1.12/testmain.go:53 +0x59
github.com/pingcap/tidb/table/tables_test.TestMain()
/go/tidb/table/tables/main_test.go:31 +0x316
main.main()
_testmain.go:133 +0x264
The test code:
_, err = tk2.Exec("insert into ttt(k,c) values(3, 'tidb')")
_, err = tk1.Exec("commit")
Looks that we have a potential data race for concurrent execution for unistore?
I think it is either a case for unistore, or something wrong with TestConstraintCheckForUniqueIndex...
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)