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

Remove the restriction that the Authority Rule must be configured #20457

Closed
RaigorJiang opened this issue Aug 23, 2022 · 1 comment · Fixed by #21599
Closed

Remove the restriction that the Authority Rule must be configured #20457

RaigorJiang opened this issue Aug 23, 2022 · 1 comment · Fixed by #21599

Comments

@RaigorJiang
Copy link
Contributor

Hi community,

Since we have DistSQL, users can use Proxy without configuring any database.

However, when a user wants to experience Proxy, he must configure AUTHORITY rule in server.yaml, so that it can start successfully.
In fact, ShardingSphere provides DefaultAuthorityRuleConfigurationBuilder and DefaultUser, which can build a root user in the absence of Authority Rule Configuration. If we enable this feature, the user's first experience can be simplified to the greatest extent, because he can start it directly after decompression.

Currently, the reason why this feature cannot be enabled is that the authorityRuleConfig is checked in the ProxyConfigurationLoader and an exception will be thrown if it is empty.

YamlRuleConfiguration authorityRuleConfig = result.getRules().stream().filter(each -> each instanceof YamlAuthorityRuleConfiguration).findAny().orElse(null);
Preconditions.checkState(containsGovernance || null != authorityRuleConfig, "Authority configuration is invalid.");

I recommend removing this restriction and building a default root user for users when there is no Authority Rule Configuration.

@github-actions
Copy link

github-actions bot commented Oct 8, 2022

Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants