-
Notifications
You must be signed in to change notification settings - Fork 730
config: add region-max-size
property
#4635
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
Conversation
Signed-off-by: bufferflies <1045931706@qq.com>
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please add a unit test to check if changing the parameter in the config file works. |
Signed-off-by: bufferflies <1045931706@qq.com>
4d6f139
to
29a8db6
Compare
Codecov Report
@@ Coverage Diff @@
## master #4635 +/- ##
==========================================
- Coverage 74.75% 74.70% -0.06%
==========================================
Files 284 285 +1
Lines 27816 27835 +19
==========================================
Hits 20795 20795
- Misses 5149 5160 +11
- Partials 1872 1880 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: bufferflies <1045931706@qq.com>
29a8db6
to
f9df236
Compare
Signed-off-by: bufferflies <1045931706@qq.com>
…pd into feature/add-region-max-size
How this config influence the TiKV? |
IDAllocator: mockid.NewIDAllocator(), | ||
HotStat: statistics.NewHotStat(ctx), | ||
PersistOptions: opts, | ||
ImmutableConfig: config.NewTestImmutableOptions(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does immutable
means that it cannot be updated by pd-ctl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, pd will reload config after restarting.
pkg/mock/mockcluster/mockcluster.go
Outdated
@@ -78,6 +80,11 @@ func (mc *Cluster) GetOpts() *config.PersistOptions { | |||
return mc.PersistOptions | |||
} | |||
|
|||
// GetConfig returns the cluster immutable configuration. | |||
func (mc *Cluster) GetConfig() *config.ImmutableConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to change the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix to GetImmutableCfg
server/config/immutable_options.go
Outdated
// ImmutableConfig is a readonly config. | ||
type ImmutableConfig struct { | ||
maxRegionSize uint64 | ||
leaderLease int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only leaderLease?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaderLease
will be remove and add max-split-size
.
the configuration will not influence the TiKVs, maybe can consider this pr:#4308 |
Signed-off-by: bufferflies <1045931706@qq.com>
0471d73
to
41f7f79
Compare
3a01315
to
2fbeb24
Compare
…pd into feature/add-region-max-size
2fbeb24
to
3dcf9e1
Compare
0cdd667
to
dc5f07a
Compare
It is not graceful to add some tikv config into the config file, so I will use call back tikv to get this config. |
Signed-off-by: bufferflies 1045931706@qq.com
What problem does this PR solve?
Issue Number: Close #4459
What is changed and how it works?
config.PersistOptions
should save the initial config and not update it .Check List
Tests
Code changes
Side effects
Related changes
Release note