-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner: simplify StatsHandler
and break it down into multiple smaller and simpler sub-modules
#46905
Labels
affects-7.5
This bug affects the 7.5.x(LTS) versions.
component/statistics
report/customer
Customers have encountered this bug.
sig/planner
SIG: Planner
type/enhancement
The issue or PR belongs to an enhancement.
Comments
qw4990
added
type/enhancement
The issue or PR belongs to an enhancement.
sig/planner
SIG: Planner
component/statistics
labels
Sep 12, 2023
12 tasks
12 tasks
12 tasks
12 tasks
13 tasks
12 tasks
|
qw4990
added a commit
to qw4990/tidb
that referenced
this issue
Sep 19, 2023
13 tasks
13 tasks
13 tasks
13 tasks
13 tasks
13 tasks
13 tasks
This was referenced Oct 19, 2023
13 tasks
13 tasks
13 tasks
13 tasks
I think it has been completed. |
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
wuhuizuo
pushed a commit
to wuhuizuo/tidb
that referenced
this issue
Apr 2, 2024
/found customer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-7.5
This bug affects the 7.5.x(LTS) versions.
component/statistics
report/customer
Customers have encountered this bug.
sig/planner
SIG: Planner
type/enhancement
The issue or PR belongs to an enhancement.
Enhancement
As you can see from the diagram below, the
StatsHandler
(statistics/handle/handle.go:Handle
) structure is too complex.Actually, there are multiple features(modules) decoupled in it, which makes it hard to maintain and evolve.
And these features rely on memory to synchronize information, which brings some risks like
whether to lock or not when accessing some fields
,which methods be thread-safe
,how to synchronize information with other nodes
.To make it easier to maintain, we'd better break it down since obviously maintaining multiple smaller and simpler modules is safer than maintaining a big and complex module.
And only allow them to synchronize information through the storage to avoid consensus problems and thread-safe issues.
The text was updated successfully, but these errors were encountered: