Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

akin-tekeoglu
Copy link

@akin-tekeoglu akin-tekeoglu commented May 12, 2024

Fixes #17822

It seemed to me that auto-compaction-interval was useless so I nuked it

@k8s-ci-robot
Copy link

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@jmhbnz
Copy link
Member

jmhbnz commented May 13, 2024

/ok-to-test

@akin-tekeoglu
Copy link
Author

akin-tekeoglu commented May 14, 2024

I see your name in the OWNERS file @fuweid. Can you take a look?

if sc.AutoCompactionMode == compactor.ModePeriodic {
autoCompactRetention = zap.Duration("auto-compaction-retention", sc.AutoCompactionRetention)
} else {
autoCompactRetention = zap.Int64("auto-compaction-retention", int64(sc.AutoCompactionRetention))
Copy link
Contributor

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?

Copy link
Author

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 <[email protected]>
@akin-tekeoglu
Copy link
Author

/retest-required

@jmhbnz
Copy link
Member

jmhbnz commented May 24, 2024

/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 {
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

auto-compaction-retention in logs displays nanoseconds when auto-compaction-mode set to revision
5 participants