-
Notifications
You must be signed in to change notification settings - Fork 816
fix wal config not work on config.yml #2071
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
Conversation
Signed-off-by: Wing924 <[email protected]>
Signed-off-by: Wing924 <[email protected]>
Signed-off-by: Wing924 <[email protected]>
pkg/ingester/wal.go
Outdated
recover bool `yaml:"recover_from_wal,omitempty"` | ||
dir string `yaml:"wal_dir,omitempty"` | ||
checkpointDuration time.Duration `yaml:"checkpoint_duration,omitempty"` | ||
WalEnabled bool `yaml:"wal_enabled,omitempty"` |
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.
WALEnabled
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.
Thanks for this fix! LGTM, with few nits.
@codesome May you review it too, please?
CHANGELOG.md
Outdated
@@ -10,6 +10,7 @@ | |||
* [ENHANCEMENT] Experimental TSDB: Added dedicated flag `-experimental.tsdb.bucket-store.tenant-sync-concurrency` to configure the maximum number of concurrent tenants for which blocks are synched. #2026 | |||
* [ENHANCEMENT] Experimental TSDB: Expose metrics for objstore operations (prefixed with `cortex_<component>_thanos_objstore_`, component being one of `ingester`, `querier` and `compactor`). #2027 | |||
* [BUGFIX] Experimental TSDB: fixed `/all_user_stats` and `/api/prom/user_stats` endpoints when using the experimental TSDB blocks storage. #2042 | |||
* [BUGFIX] Ingester: fixed `ingester.walconfig` not work on config.yml. #2071 |
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.
I would rephrase it to make it a bit more clear, something like:
* [BUGFIX] Fixed parsing of the WAL configuration when specified in the YAML config file. #2071
pkg/ingester/ingester.go
Outdated
@@ -141,7 +141,7 @@ func New(cfg Config, clientConfig client.Config, limits *validation.Overrides, c | |||
return NewV2(cfg, clientConfig, limits, registerer) | |||
} | |||
|
|||
if cfg.WALConfig.walEnabled { | |||
if cfg.WALConfig.WalEnabled { |
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.
May you rename WalEnabled
to WALEnabled
, please?
pkg/ingester/wal.go
Outdated
CheckpointEnabled bool `yaml:"checkpoint_enabled,omitempty"` | ||
Recover bool `yaml:"recover_from_wal,omitempty"` | ||
Dir string `yaml:"wal_dir,omitempty"` | ||
CheckpointDuration time.Duration `yaml:"checkpoint_duration,omitempty"` | ||
metricsRegisterer prometheus.Registerer |
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.
Despite correct, please also add yaml:"-"
to enforce we don't want it to be configurable.
Signed-off-by: Wing924 <[email protected]>
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.
Great bug to fix! Thank you for submitting this
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]> Co-authored-by: Wei He <[email protected]>
Signed-off-by: Wing924 [email protected]
What this PR does:
Fix bug:
walconfig
on config file don't workYAML library use reflect to assign fields, but reflect can't access private fields.
This PR make all ingester.WALConfig public so that
walconfig.*
can work without error.Which issue(s) this PR fixes:
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]