Closed sleepymole closed 3 years ago
[REVIEW NOTIFICATION]
This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer
in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer
in the comment to help you merge this pull request.
The full list of commands accepted by this bot can be found here.
Data race also occurred in test of shardddl/optimism
:
WARNING: DATA RACE
Write at 0x00c0000c1990 by goroutine 7:
runtime.closechan()
/usr/lib/go/src/runtime/chan.go:355 +0x0
github.com/pingcap/dm/dm/master/shardddl.(*testOptimist).testOptimist()
/home/xyj/Projects/dm/dm/master/shardddl/optimist_test.go:381 +0x9924
github.com/pingcap/dm/dm/master/shardddl.(*testOptimist).TestOptimist()
/home/xyj/Projects/dm/dm/master/shardddl/optimist_test.go:155 +0x339
runtime.call16()
/usr/lib/go/src/runtime/asm_amd64.s:625 +0x48
reflect.Value.Call()
/usr/lib/go/src/reflect/value.go:339 +0x149
github.com/pingcap/check.(*suiteRunner).forkTest.func1()
/home/xyj/.local/go/pkg/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:850 +0xa7c
github.com/pingcap/check.(*suiteRunner).forkCall.func1()
/home/xyj/.local/go/pkg/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:739 +0x244
Previous read at 0x00c0000c1990 by goroutine 91:
runtime.chansend()
/usr/lib/go/src/runtime/chan.go:158 +0x0
github.com/pingcap/dm/pkg/shardddl/optimism.WatchOperationPut()
/home/xyj/Projects/dm/pkg/shardddl/optimism/operation.go:271 +0x10a4
github.com/pingcap/dm/dm/master/shardddl.(*testOptimist).testOptimist·dwrap·23()
/home/xyj/Projects/dm/dm/master/shardddl/optimist_test.go:376 +0x26a
All related tests are fixed now.
/merge
This pull request has been accepted and is ready to merge.
In response to a cherrypick label: new pull request created: #2240.
What problem does this PR solve?
There is data race in test TestOperationEtcd:
What is changed and how it works?
Use
watchExactPutOperations
to watch exact number of operations.Check List
Tests
Code changes
Side effects
Related changes