Add max-days
and max-backups
default value 0 means for PD (#9330)
#9917
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automated cherry-pick of #9330
What is changed, added or deleted? (Required)
This pull request adds
max-days
andmax-backups
default value 0 means for PD configuration guide. There is a similar document for TiKV'smax-days
andmax-backups
via #7425 There is no PD one.Here are the technical backgrounds for these documentation changes.
https://github.com/tikv/pd/blob/b5e113436c85f81d0e6ca2b5b592271114089db2/conf/config.toml#L97
https://github.com/tikv/pd/blob/b5e113436c85f81d0e6ca2b5b592271114089db2/pkg/logutil/log.go#L33-L34
It says "default is never deleting."
https://github.com/tikv/pd/blob/b5e113436c85f81d0e6ca2b5b592271114089db2/conf/config.toml#L99
https://github.com/tikv/pd/blob/b5e113436c85f81d0e6ca2b5b592271114089db2/pkg/logutil/log.go#L35-L36
log.go
does not anything about the default value. Based on the method lookup, I believe MaxBackups default behavior is defined by https://github.com/natefinch/lumberjack default value as follows.https://github.com/pingcap/log/blob/07caf4f152b9d53fedb241dc5e5aaa282fdaa74b/log.go#L126
https://github.com/natefinch/lumberjack/blob/47ffae23317c5951a2a6267a069cf676edf53eb6/lumberjack.go#L96-L99
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?