-
Notifications
You must be signed in to change notification settings - Fork 472
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
fix(config): avoid rewriting the config file if it's unnecessary #2347
fix(config): avoid rewriting the config file if it's unnecessary #2347
Conversation
26ac817
to
d6666f1
Compare
The server start will rewrite the config file to presist namespace/token pairs if the namespace replication is enabled. But it's unnecessary if the namespace replication is diabled or no tokens were loaded from the configuration file, because the purpose of this rewrite is to remove tokens from the config file and write to the Database.
d6666f1
to
d4404a2
Compare
It can fix the problem when there's no namespace in kvrocks except the default one. But what if there are some namespaces? We also need to consider this situation. |
|
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.
Sounds good to me.
c62ab5d
to
7c584a1
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
The server start will rewrite the config file to persist namespace/token pairs
if the namespace replication is enabled. But it's unnecessary if the namespace replication
is disabled or no tokens were loaded from the configuration file because the purpose of
this rewrite is to remove tokens from the config file and write to the Database.