Skip to content
New issue

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

Optimize the lock usage in resource controller #8918

Open
nolouch opened this issue Dec 15, 2024 · 0 comments
Open

Optimize the lock usage in resource controller #8918

nolouch opened this issue Dec 15, 2024 · 0 comments
Labels
type/development The issue belongs to a development tasks

Comments

@nolouch
Copy link
Contributor

nolouch commented Dec 15, 2024

Development Task

79574260 2380 @ 0x1037b3079 0x1037b305a 0x1037ad6c5 0x1037cc578 0x1037cbee2 0x1037d1c73 0x1037cb31d 0x1037d16d3 0x1037fa592 0x1037f6c7b 0x10385bded 0x103863632 0x1038624c5 0x10464bbcb 0x10626b9bb 0x10626ab8b 0x1062693f2 0x1057e251f 0x106126fae 0x10611e828 0x10643f662 0x1064aeb4c 0x1064adfd3 0x1064b3727 0x1064b2b30 0x1064b26a9 0x1064a70bb 0x1064a3288 0x1064c6adf 0x1064c5425 0x102b717a1
#	0x1037b3078	sync.(*Mutex).Unlock+0x1b8										/Users/siddon/go/pkg/mod/[golang.org/[email protected]/src/sync/mutex.go:225](http://golang.org/[email protected]/src/sync/mutex.go:225)
#	0x1037b3059	[github.com/tikv/pd/client/resource_group/controller.(*groupCostController).onRequestWaitImpl+0x199](http://github.com/tikv/pd/client/resource_group/controller.(*groupCostController).onRequestWaitImpl+0x199)	/Users/siddon/go/pkg/mod/[github.com/tikv/pd/[email protected]/resource_group/controller/controller.go:1400](http://github.com/tikv/pd/[email protected]/resource_group/controller/controller.go:1400)
#	0x1037ad6c4	[github.com/tikv/pd/client/resource_group/controller.(*ResourceGroupsController).OnRequestWait+0x64](http://github.com/tikv/pd/client/resource_group/controller.(*ResourceGroupsController).OnRequestWait+0x64)	/Users/siddon/go/pkg/mod/[github.com/tikv/pd/[email protected]/resource_group/controller/controller.go:646](http://github.com/tikv/pd/[email protected]/resource_group/controller/controller.go:646)
#	0x1037cc577	[github.com/tikv/client-go/v2/internal/client.buildResourceControlInterceptor.func1.1+0x137](http://github.com/tikv/client-go/v2/internal/client.buildResourceControlInterceptor.func1.1+0x137)		/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_interceptor.go:108](http://github.com/tikv/client-go/[email protected]/internal/client/client_interceptor.go:108)
#	0x1037cbee1	[github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest+0x1c1](http://github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest+0x1c1)			/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_interceptor.go:58](http://github.com/tikv/client-go/[email protected]/internal/client/client_interceptor.go:58)
#	0x1037d1c72	[github.com/tikv/client-go/v2/internal/client.(*interceptedClient).SendRequest+0x52](http://github.com/tikv/client-go/v2/internal/client.(*interceptedClient).SendRequest+0x52)			<autogenerated>:1
#	0x1037cb31c	[github.com/tikv/client-go/v2/internal/client.reqCollapse.SendRequest+0xbc](http://github.com/tikv/client-go/v2/internal/client.reqCollapse.SendRequest+0xbc)				/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_collapse.go:74](http://github.com/tikv/client-go/[email protected]/internal/client/client_collapse.go:74)
#	0x1037d16d2	[github.com/tikv/client-go/v2/internal/client.(*reqCollapse).SendRequest+0x52](http://github.com/tikv/client-go/v2/internal/client.(*reqCollapse).SendRequest+0x52)				<autogenerated>:1
#	0x1037fa591	[github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).sendReqToRegion+0x8d1](http://github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).sendReqToRegion+0x8d1)		/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:1114](http://github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:1114)
#	0x1037f6c7a	[github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).SendReqCtx+0x14ba](http://github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).SendReqCtx+0x14ba)			/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:870](http://github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:870)
#	0x10385bdec	[github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*ClientHelper).SendReqCtx+0x22c](http://github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*ClientHelper).SendReqCtx+0x22c)				/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/client_helper.go:146](http://github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/client_helper.go:146)
#	0x103863631	[github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*KVSnapshot).get+0xb71](http://github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*KVSnapshot).get+0xb71)					/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/snapshot.go:721](http://github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/snapshot.go:721)
#	0x1038624c4	[github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*KVSnapshot).Get+0x5c4](http://github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*KVSnapshot).Get+0x5c4)					/Users/siddon/go/pkg/mod/[github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/snapshot.go:633](http://github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/snapshot.go:633)
#	0x10464bbca	[github.com/pingcap/tidb/pkg/store/driver/txn.(*tikvSnapshot).Get+0xea](http://github.com/pingcap/tidb/pkg/store/driver/txn.(*tikvSnapshot).Get+0xea)					/Users/siddon/eng/tidb/pkg/store/driver/txn/snapshot.go:60
#	0x10626b9ba	[github.com/pingcap/tidb/pkg/executor.(*PointGetExecutor).get+0x4da](http://github.com/pingcap/tidb/pkg/executor.(*PointGetExecutor).get+0x4da)					/Users/siddon/eng/tidb/pkg/executor/point_get.go:687
#	0x10626ab8a	[github.com/pingcap/tidb/pkg/executor.(*PointGetExecutor).getAndLock+0x18a](http://github.com/pingcap/tidb/pkg/executor.(*PointGetExecutor).getAndLock+0x18a)				/Users/siddon/eng/tidb/pkg/executor/point_get.go:561
#	0x1062693f1	[github.com/pingcap/tidb/pkg/executor.(*PointGetExecutor).Next+0x771](http://github.com/pingcap/tidb/pkg/executor.(*PointGetExecutor).Next+0x771)					/Users/siddon/eng/tidb/pkg/executor/point_get.go:394



there are too many locks.

@nolouch nolouch added the type/development The issue belongs to a development tasks label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/development The issue belongs to a development tasks
Projects
None yet
Development

No branches or pull requests

1 participant