-
Notifications
You must be signed in to change notification settings - Fork 721
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
*: limit region count #7100
base: master
Are you sure you want to change the base?
*: limit region count #7100
Conversation
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
[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. |
Skipping CI for Draft Pull Request. |
} | ||
|
||
// GetReplicaCount get used memory of all stores. | ||
func (s *StoresInfo) GetReplicaCount() uint64 { |
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.
the func comment is different with the function name.
return bc.Stores.GetReplicaCount() | ||
} | ||
|
||
// CheckAllowedRegionReplicaCount get the number of allowed region replica count of the TiKV cluster. |
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.
needs to fix the function comment.
@@ -58,6 +59,16 @@ const ( | |||
defaultEnableWitness = false | |||
defaultHaltScheduling = false | |||
|
|||
// TODO: set default to false |
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.
set true if raft engine switch to v2
// See https://gist.github.com/overvenus/4b52386f07ee34cf4dbdc62961b22763 | ||
defaultMemoryUsagePerRegionReplicaV1 = typeutil.ByteSize(4 * units.MiB) | ||
// The default memory usage per-region in raftstore v2. | ||
defaultMemoryUsagePerRegionReplicaV2 = typeutil.ByteSize(4 * units.MiB) |
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.
Can we stat the memory of every region?
@@ -41,6 +43,7 @@ func (se *StorageEndpoint) LoadConfig(cfg interface{}) (bool, error) { | |||
} | |||
err = json.Unmarshal([]byte(value), cfg) | |||
if err != nil { | |||
log.Warn("dbg invalid config", zap.String("value", string(value))) |
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.
should it need to log the error info?
} | ||
|
||
// CheckAllowedRegionReplicaCount get the number of allowed region replica count of the TiKV cluster. | ||
func (bc *BasicCluster) CheckAllowedRegionReplicaCount(count uint64) bool { |
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.
We need a way to alert the user to know cluster alarms.
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What problem does this PR solve?
Issue Number: ref #6850
cc pingcap/kvproto#1187
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs
/pingcap/docs-cn
:Release note