You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cause is that RuleManager.GetRule does not return a copy of rule but a pointer to the rule which is stored in rule manager. In server.go when we update the rule we are updating the rule in rule manager at the same time. When the rule is about to save to storage, it will be skipped because if we compare the new rule and the rule in rule manager, they are exact the same.
Taken together, the phenomenon is that rule will be temporarily updated. But when the PD is restarted or a leader re-election occurs, the original configuration appears again.
Way to fix: Change methods such as GetRule to return a cloned rule.
When changing the replication.max-replicas to anything different than 1 the service is dying and the client is returning: Failed to set config: [500] PANIC: runtime error: invalid memory address or nil pointer dereference goroutine 24385 [running]:
Bug Report
What did you do?
deploy tidb cluster with default config
enable placement rules
online update replication.max-replicas to 1
show placement rule
What did you expect to see?
The replica count of default placement rule is 3. This is a little confusing whether I complete the update of replicas count.
What did you see instead?
The replica count of default placement rule stays same with the config replication.max-replicas.
What version of PD are you using (
pd-server -V
)?v5.1.0
The text was updated successfully, but these errors were encountered: