-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Fix the auto-compaction-retention logging in the startup #17986
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Akin Tekeoglu <akin.tekeoglu@gmail.com>
Hi @akin-tekeoglu. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
I see your name in the OWNERS file @fuweid. Can you take a look? |
server/embed/etcd.go
Outdated
if sc.AutoCompactionMode == compactor.ModePeriodic { | ||
autoCompactRetention = zap.Duration("auto-compaction-retention", sc.AutoCompactionRetention) | ||
} else { | ||
autoCompactRetention = zap.Int64("auto-compaction-retention", int64(sc.AutoCompactionRetention)) |
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 like this simplification for less confusion. But should we keep the name the name not to breaking existing users?
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.
@siyuanfoundation I made the changes. Can you take a look again?
Signed-off-by: Akin Tekeoglu <akin.tekeoglu@gmail.com>
/retest-required |
/retest |
@@ -307,6 +309,12 @@ func print(lg *zap.Logger, ec Config, sc config.ServerConfig, memberInitialized | |||
if quota == 0 { | |||
quota = storage.DefaultQuotaBytes | |||
} | |||
var autoCompactionRetention zapcore.Field | |||
if sc.AutoCompactionMode == compactor.ModePeriodic { |
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.
There is type alias for compactor.ModePeriodc
in server/embed: CompactorModePeriodic
.
Please consider to use switch
branch because that mode can be invalid, like empty.
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Fixes #17822
It seemed to me that
auto-compaction-interval
was useless so I nuked it