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

Placement option of FOLLOWERS=4 not supported #28767

Closed
Tracked by #18030
morgo opened this issue Oct 13, 2021 · 5 comments · Fixed by #29050
Closed
Tracked by #18030

Placement option of FOLLOWERS=4 not supported #28767

morgo opened this issue Oct 13, 2021 · 5 comments · Fixed by #29050
Assignees
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@morgo
Copy link
Contributor

morgo commented Oct 13, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> CREATE TABLE t1 (a int) FOLLOWERS=4;
ERROR 1105 (HY000): failed to notify PD the placement rules: "[PD:placement:ErrBuildRuleList]build rule list failed, needs at least one leader or voter for range {7480000000000000FF5000000000000000F8, 7480000000000000FF5100000000000000F8}"

2. What did you expect to see? (Required)

This should work. It implies there is a leader, and now 4 followers with no constraints.

3. What did you see instead (Required)

Error

4. What is your TiDB version? (Required)

mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v5.3.0-alpha-1064-gfd42198c3-dirty
Edition: Community
Git Commit Hash: fd42198c3916cbe666c6339784418db646d4eef6
Git Branch: revoke-all-with-role-syntax
UTC Build Time: 2021-10-12 00:13:16
GoVersion: go1.16.7
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
@morgo morgo added the type/bug The issue is confirmed as a bug. label Oct 13, 2021
@morgo
Copy link
Contributor Author

morgo commented Oct 13, 2021

This was first commented on #27974 under the subject of validation. But it should be a legal case that is accepted/translated by the rules engine.

@AilinKid
Copy link
Contributor

inference about the unmentioned constraints, what do you think @xhebox @lcwangchao

@xhebox
Copy link
Contributor

xhebox commented Oct 15, 2021

inference about the unmentioned constraints, what do you think @xhebox @lcwangchao

I think the thing is that morgo thought it is an sugar option, where primaryRegion is omitted. But in my implementation, it is the non-sugar syntax where every thing needs to be explicit. @morgo

If that is the case, it is easy to fix.

@morgo
Copy link
Contributor Author

morgo commented Oct 15, 2021

I think we should consider it both sugar/non-sugar, although it can't be specified in non-sugar with dict constraints.

Yes, let's fix it :-) The leader can be implied as 1, and constraints can be implied as none.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants