-
Notifications
You must be signed in to change notification settings - Fork 594
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
feat: use SHOW PARAMETERS
to list all system parameters
#7882
Conversation
SHOW PARAMETERS
SHOW PARAMETERS
to see all system parameters
SHOW PARAMETERS
to see all system parametersSHOW PARAMETERS
to list all system parameters
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.
Generally LGTM
async fn insert<S>(&self, store: &S) -> MetadataModelResult<()> | ||
where | ||
S: MetaStore, | ||
{ | ||
let mut txn = Transaction::default(); | ||
self.barrier_interval_ms.inspect(|v| { |
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.
Good job!
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.
LGTM
83c4d48
to
2ac54df
Compare
Codecov Report
@@ Coverage Diff @@
## main #7882 +/- ##
==========================================
+ Coverage 71.78% 71.80% +0.02%
==========================================
Files 1114 1116 +2
Lines 178474 178506 +32
==========================================
+ Hits 128115 128185 +70
+ Misses 50359 50321 -38
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@Gun9niR @fuyufjh I'm wondering if we have the definitions of these parameters (and how to use) documented somewhere? This one should be documented together with ALTER SYSTEM. I need a bit more info than just the command and the parameter names :) Thanks a lot! |
@hengm3467 Please check system_param.rs for the source of truth. (You might need to switch to the correct branch other than It's worth mentioning that risingwave/src/common/src/system_param.rs Lines 138 to 140 in ffce86a
So a param is either immutable or has a validation range defined there. |
@hengm3467 You can check For value range/mutability, you can check |
const SYSTEM_PARAM_CF_NAME: &str = "cf/system_params"; | ||
|
||
const BARRIER_INTERVAL_MS_KEY: &str = "barrier_interval_ms"; | ||
const CHECKPOINT_FREQUENCY_KEY: &str = "checkpoint_interval"; |
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.
This is changed. Is this expected? 🤣
https://github.com/risingwavelabs/risingwave-docs/pull/1002
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.
These hard-coded constants were only used for a few commits before I refactored the code to use macro to generate these keys (const CHECKPOINT_FREQUENCY_KEY: &str = "checkpoint_interval";
seems to be a mistake here). The key in etcd has been checkpoint_frequency
since this commit.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
As title. Also refactored the code with macro to reduce the occurrence of hard coded keys such as
CHECKPOINT_FREQUENCY_KEY
.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note
Use
SHOW PARAMETERS;
to show all system parameters.