-
Notifications
You must be signed in to change notification settings - Fork 820
Enable setting default chunk encoding by config file (#2077) #4086
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
1434b99
to
8a64704
Compare
Can you please rebase against master to pull in #4137 and move the changelog entry to the top? |
pkg/chunk/encoding/factory.go
Outdated
New: func() Chunk { | ||
return newVarbitChunk(varbitZeroEncoding) | ||
}, | ||
}, | ||
Bigchunk: { | ||
Name: "Bigchunk", | ||
Name: "big-chunk", |
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.
question: If anyone is currently using the existing flag will this be a breaking change? Maybe it'd be best to keep the values for encoding types as is.
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.
Agreed.
func (Config) RegisterFlags(f *flag.FlagSet) { | ||
f.Var(&DefaultEncoding, "ingester.chunk-encoding", "Encoding version to use for chunks.") | ||
func (cfg *Config) RegisterFlags(f *flag.FlagSet) { | ||
f.StringVar(&cfg.EncodingName, "encoding.chunk-encoding", "BigChunk", "Encoding version to use for chunks.") |
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.
Unfortunately we can't change CLI flag names or default values, otherwise we break our backward compatibility guarantee (see https://cortexmetrics.io/docs/configuration/v1guarantees/).
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.
Thank you for reminding!
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.
@pracucci Is it allowed to set a value using different names in CLI and json?
E.g. set DefaultEnconding
using the CLI flag ingester.chunk-encoding
, but set it as
encoding:
chunk_encoding: BigChunk
in yaml config files?
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
Chunk storage has now been deprecated: #4268 |
What this PR does:
Adds a field to
Encoding.Config
to allow parsing the string value from config files.DefaultEncoding
is later set infunc New
atcortex.go
.Please let me know if some tests should be introduced.
Any suggestion is appreciated!
Which issue(s) this PR fixes:
Fixes #2077
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]