etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
47.86k stars 9.77k forks source link

etcdserver: rename defaultCompactionSleepInterval var #18495

Closed JalinWang closed 2 months ago

JalinWang commented 2 months ago

fix comment in PR https://github.com/etcd-io/etcd/pull/13018#discussion_r1730275709

k8s-ci-robot commented 2 months ago

Hi @JalinWang. 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
ivanvc commented 2 months ago

/ok-to-test

ivanvc commented 2 months ago

Thanks for the pull request, @JalinWang. It looks like you missed updating the value in server/storage/mvcc/kvstore_test.go. Can you please update it, too?

@ahrtr, you suggested the variable be named defaultBatchInterval. Are you okay with defaultCompactionSleepInterval?

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 42.73504% with 201 lines in your changes missing coverage. Please review.

Project coverage is 68.80%. Comparing base (21e5876) to head (d9c8401). Report is 188 commits behind head on main.

:exclamation: Current head d9c8401 differs from pull request most recent head 9db3bd3

Please upload reports for the commit 9db3bd3 to get more accurate results.

Files Patch % Lines
client/v3/kubernetes/client.go 0.00% 91 Missing :warning:
server/embed/config_logging.go 11.11% 23 Missing and 1 partial :warning:
etcdctl/ctlv3/command/get_command.go 0.00% 18 Missing :warning:
client/v3/maintenance.go 13.33% 13 Missing :warning:
server/etcdserver/server.go 69.23% 8 Missing and 4 partials :warning:
etcdctl/ctlv3/command/snapshot_command.go 0.00% 8 Missing :warning:
client/v3/auth.go 66.66% 6 Missing :warning:
client/v3/lease.go 40.00% 6 Missing :warning:
pkg/cobrautl/help.go 76.47% 4 Missing :warning:
server/embed/config.go 88.57% 2 Missing and 2 partials :warning:
... and 8 more

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files | [Files](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [client/v3/client.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=client%2Fv3%2Fclient.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y2xpZW50L3YzL2NsaWVudC5nbw==) | `84.89% <100.00%> (ø)` | | | [client/v3/kv.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=client%2Fv3%2Fkv.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y2xpZW50L3YzL2t2Lmdv) | `94.44% <100.00%> (ø)` | | | [client/v3/txn.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=client%2Fv3%2Ftxn.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y2xpZW50L3YzL3R4bi5nbw==) | `100.00% <100.00%> (ø)` | | | [client/v3/watch.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=client%2Fv3%2Fwatch.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y2xpZW50L3YzL3dhdGNoLmdv) | `93.83% <100.00%> (ø)` | | | [pkg/wait/wait\_time.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=pkg%2Fwait%2Fwait_time.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGtnL3dhaXQvd2FpdF90aW1lLmdv) | `100.00% <ø> (ø)` | | | [server/auth/simple\_token.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=server%2Fauth%2Fsimple_token.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2VydmVyL2F1dGgvc2ltcGxlX3Rva2VuLmdv) | `88.46% <100.00%> (ø)` | | | [server/config/config.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=server%2Fconfig%2Fconfig.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2VydmVyL2NvbmZpZy9jb25maWcuZ28=) | `79.76% <ø> (ø)` | | | [server/etcdserver/api/v3rpc/health.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=server%2Fetcdserver%2Fapi%2Fv3rpc%2Fhealth.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2VydmVyL2V0Y2RzZXJ2ZXIvYXBpL3YzcnBjL2hlYWx0aC5nbw==) | `57.69% <100.00%> (ø)` | | | [server/etcdserver/raft.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=server%2Fetcdserver%2Fraft.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2VydmVyL2V0Y2RzZXJ2ZXIvcmFmdC5nbw==) | `87.16% <100.00%> (ø)` | | | [server/storage/mvcc/key\_index.go](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree&filepath=server%2Fstorage%2Fmvcc%2Fkey_index.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2VydmVyL3N0b3JhZ2UvbXZjYy9rZXlfaW5kZXguZ28=) | `64.70% <100.00%> (ø)` | | | ... and [19 more](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | ... and [391 files with indirect coverage changes](https://app.codecov.io/gh/etcd-io/etcd/pull/18495/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) ```diff @@ Coverage Diff @@ ## main #18495 +/- ## ========================================= + Coverage 0 68.80% +68.80% ========================================= Files 0 420 +420 Lines 0 35489 +35489 ========================================= + Hits 0 24418 +24418 - Misses 0 9642 +9642 - Partials 0 1429 +1429 ``` ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Last update [21e5876...9db3bd3](https://app.codecov.io/gh/etcd-io/etcd/pull/18495?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).
JalinWang commented 2 months ago

Thanks for the pull request, @JalinWang. It looks like you missed updating the value in server/storage/mvcc/kvstore_test.go. Can you please update it, too?

Apologies :( I overlooked its usage in later commits.

@ahrtr, you suggested the variable be named defaultBatchInterval. Are you okay with defaultCompactionSleepInterval?

Following cfg.CompactionBatchLimit = defaultCompactBatchLimit, I think it's better to use defaultCompactionSleepInterval instead of the suggested defaultBatchInterval for cfg.CompactionSleepInterval.

update: emmm cfg.Compact**ion**BatchLimit -> defaultCompactBatchLimit... Should I make them the same? 🫤

JalinWang commented 2 months ago

/retest

JalinWang commented 2 months ago

/retest

JalinWang commented 2 months ago

/retest-required

ahrtr commented 2 months ago

update: emmm cfg.Compact**ion**BatchLimit -> defaultCompactBatchLimit... Should I make them the same? 🫤

OK to me.

ahrtr commented 2 months ago

Please squash the commits.

ahrtr commented 2 months ago

Please squash the commits.

Let me do it this time.

k8s-ci-robot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, JalinWang, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/etcd-io/etcd/blob/main/OWNERS)~~ [ahrtr,serathius] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment