We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsRegionHot
go test -timeout 120s -run ^TestSpecialUseHotRegion$ github.com/tikv/pd/pkg/schedule/schedulers -race
no data race
================== WARNING: DATA RACE Write at 0x00c00003b2f0 by goroutine 210: runtime.mapassign_fast64() /usr/lib/go/src/runtime/map_fast64.go:93 +0x0 github.com/tikv/pd/pkg/statistics.(*HotPeerCache).putItem() /home/lhy1024/pd/pkg/statistics/hot_peer_cache.go:521 +0x14e github.com/tikv/pd/pkg/statistics.(*HotPeerCache).UpdateStat() /home/lhy1024/pd/pkg/statistics/hot_peer_cache.go:111 +0x64 github.com/tikv/pd/pkg/statistics.(*HotCache).Update() /home/lhy1024/pd/pkg/statistics/hot_cache.go:202 +0x8c github.com/tikv/pd/pkg/mock/mockcluster.(*Cluster).AddLeaderRegionWithWriteInfo() /home/lhy1024/pd/pkg/mock/mockcluster/mockcluster.go:552 +0x464 github.com/tikv/pd/pkg/schedule/schedulers.TestSpecialUseHotRegion() /home/lhy1024/pd/pkg/schedule/schedulers/scheduler_test.go:350 +0xa3b testing.tRunner() /usr/lib/go/src/testing/testing.go:1689 +0x21e testing.(*T).Run.gowrap1() /usr/lib/go/src/testing/testing.go:1742 +0x44 Previous read at 0x00c00003b2f0 by goroutine 214: runtime.mapaccess2_fast64() /usr/lib/go/src/runtime/map_fast64.go:53 +0x0 github.com/tikv/pd/pkg/statistics.(*HotPeerCache).getHotPeerStat() /home/lhy1024/pd/pkg/statistics/hot_peer_cache.go:429 +0x57 github.com/tikv/pd/pkg/statistics.(*HotPeerCache).isRegionHotWithPeer() /home/lhy1024/pd/pkg/statistics/hot_peer_cache.go:422 +0x9c github.com/tikv/pd/pkg/statistics.(*HotPeerCache).isRegionHotWithAnyPeers() /home/lhy1024/pd/pkg/statistics/hot_peer_cache.go:411 +0xd0 github.com/tikv/pd/pkg/statistics.(*HotCache).IsRegionHot.func1() /home/lhy1024/pd/pkg/statistics/hot_cache.go:108 +0x4b github.com/tikv/pd/pkg/statistics.(*HotCache).runWriteTask() /home/lhy1024/pd/pkg/statistics/hot_cache.go:192 +0x5e github.com/tikv/pd/pkg/statistics.(*HotCache).runWriteTask-fm() <autogenerated>:1 +0x3d github.com/tikv/pd/pkg/statistics.(*HotCache).updateItems() /home/lhy1024/pd/pkg/statistics/hot_cache.go:176 +0x87 github.com/tikv/pd/pkg/statistics.NewHotCache.gowrap2() /home/lhy1024/pd/pkg/statistics/hot_cache.go:49 +0x4f Goroutine 210 (running) created at: testing.(*T).Run() /usr/lib/go/src/testing/testing.go:1742 +0x825 testing.runTests.func1() /usr/lib/go/src/testing/testing.go:2161 +0x85 testing.tRunner() /usr/lib/go/src/testing/testing.go:1689 +0x21e testing.runTests() /usr/lib/go/src/testing/testing.go:2159 +0x8be testing.(*M).Run() /usr/lib/go/src/testing/testing.go:2027 +0xf17 main.main() _testmain.go:227 +0x2bd Goroutine 214 (running) created at: github.com/tikv/pd/pkg/statistics.NewHotCache() /home/lhy1024/pd/pkg/statistics/hot_cache.go:49 +0x444 github.com/tikv/pd/pkg/statistics.NewHotStat() /home/lhy1024/pd/pkg/statistics/hot_stat.go:33 +0x34 github.com/tikv/pd/pkg/mock/mockcluster.NewCluster() /home/lhy1024/pd/pkg/mock/mockcluster/mockcluster.go:70 +0x1a8 github.com/tikv/pd/pkg/schedule/schedulers.prepareSchedulersTest() /home/lhy1024/pd/pkg/schedule/schedulers/scheduler_test.go:42 +0x91 github.com/tikv/pd/pkg/schedule/schedulers.TestSpecialUseHotRegion() /home/lhy1024/pd/pkg/schedule/schedulers/scheduler_test.go:313 +0x73 testing.tRunner() /usr/lib/go/src/testing/testing.go:1689 +0x21e testing.(*T).Run.gowrap1() /usr/lib/go/src/testing/testing.go:1742 +0x44 ================== --- FAIL: TestSpecialUseHotRegion (0.01s) testing.go:1398: race detected during execution of test FAIL
pd-server -V
The text was updated successfully, but these errors were encountered:
it is introduced by #8164
Sorry, something went wrong.
statistics: fix data race in IsRegionHot (#8336)
114cb56
close #8335 Signed-off-by: lhy1024 <admin@liudos.us>
statistics: fix data race in IsRegionHot (#8336) (#8341)
6f2f9ed
close #8335 Signed-off-by: lhy1024 <admin@liudos.us> Co-authored-by: lhy1024 <admin@liudos.us>
Successfully merging a pull request may close this issue.
Bug Report
What did you do?
go test -timeout 120s -run ^TestSpecialUseHotRegion$ github.com/tikv/pd/pkg/schedule/schedulers -race
What did you expect to see?
no data race
What did you see instead?
What version of PD are you using (
pd-server -V
)?The text was updated successfully, but these errors were encountered: