-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] Support persistent configuration #54941
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Perhaps you can explain your approach in case I don't understand, I dont think this is a good approach to check if in container and writing to files. Can't we use a different approach like persisiting to Starrocks meta? |
Signed-off-by: crossoverJie <[email protected]>
Sorry for not explaining the background clearly. In the k8s environment, users maintain configuration files using The above background has been agreed upon with @kevincai @gengjun-git . |
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
try (FileReader reader = new FileReader(configPath)) { | ||
props.load(reader); | ||
} | ||
String oldValue = props.getProperty(key); |
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.
if the oldValue is null, the comment should be:
The user xxx added key = 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.
Done
writer.write(key + " = " + value); | ||
writer.newLine(); | ||
|
||
while (i + 1 < lines.size() && !lines.get(i + 1).startsWith("#") && !lines.get(i + 1).contains("=")) { |
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.
Why remove the following comments?
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.
It's been fixed.
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Signed-off-by: crossoverJie <[email protected]>
Quality Gate passedIssues Measures |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]❌ fail : 52 / 78 (66.67%) file detail
|
Why I'm doing:
What I'm doing:
Fixes #52374
Using
ADMIN SET FRONTEND CONFIG ("key" = "value") WITH PERSISTENT;
to persist the configuration.When restarting FE, these configurations still take effect.
This feature is only effective when the configuration file has write permissions in a virtual machine environment (it cannot be used in a container environment).
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: