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

etcdserver: rename defaultCompactionSleepInterval var #18495

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

JalinWang
Copy link
Contributor

fix comment in PR #13018 (comment)

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
@k8s-ci-robot
Copy link

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ivanvc
Copy link
Member

ivanvc commented Aug 26, 2024

/ok-to-test

@ivanvc
Copy link
Member

ivanvc commented Aug 26, 2024

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?

@ivanvc ivanvc mentioned this pull request Aug 26, 2024
2 tasks
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2024

⚠️ 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.

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 ⚠️
server/embed/config_logging.go 11.11% 23 Missing and 1 partial ⚠️
etcdctl/ctlv3/command/get_command.go 0.00% 18 Missing ⚠️
client/v3/maintenance.go 13.33% 13 Missing ⚠️
server/etcdserver/server.go 69.23% 8 Missing and 4 partials ⚠️
etcdctl/ctlv3/command/snapshot_command.go 0.00% 8 Missing ⚠️
client/v3/auth.go 66.66% 6 Missing ⚠️
client/v3/lease.go 40.00% 6 Missing ⚠️
pkg/cobrautl/help.go 76.47% 4 Missing ⚠️
server/embed/config.go 88.57% 2 Missing and 2 partials ⚠️
... and 8 more

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

Additional details and impacted files
Files Coverage Δ
client/v3/client.go 84.89% <100.00%> (ø)
client/v3/kv.go 94.44% <100.00%> (ø)
client/v3/txn.go 100.00% <100.00%> (ø)
client/v3/watch.go 93.83% <100.00%> (ø)
pkg/wait/wait_time.go 100.00% <ø> (ø)
server/auth/simple_token.go 88.46% <100.00%> (ø)
server/config/config.go 79.76% <ø> (ø)
server/etcdserver/api/v3rpc/health.go 57.69% <100.00%> (ø)
server/etcdserver/raft.go 87.16% <100.00%> (ø)
server/storage/mvcc/key_index.go 64.70% <100.00%> (ø)
... and 19 more

... and 391 files with indirect coverage changes

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21e5876...9db3bd3. Read the comment docs.

@JalinWang
Copy link
Contributor Author

JalinWang commented Aug 26, 2024

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? 🫤

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
@JalinWang
Copy link
Contributor Author

/retest

1 similar comment
@JalinWang
Copy link
Contributor Author

/retest

@JalinWang
Copy link
Contributor Author

/retest-required

@ahrtr
Copy link
Member

ahrtr commented Aug 26, 2024

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

OK to me.

@@ -40,7 +40,7 @@ var (

var restoreChunkKeys = 10000 // non-const for testing
var defaultCompactBatchLimit = 1000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit as you suggested

Suggested change
var defaultCompactBatchLimit = 1000
var defaultCompactionBatchLimit = 1000

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 done

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
@ahrtr
Copy link
Member

ahrtr commented Aug 27, 2024

Please squash the commits.

@ahrtr
Copy link
Member

ahrtr commented Aug 27, 2024

Please squash the commits.

Let me do it this time.

@k8s-ci-robot
Copy link

[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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit 2c53be7 into etcd-io:main Aug 27, 2024
44 checks passed
JalinWang added a commit to JalinWang/etcd that referenced this pull request Aug 29, 2024
* etcdserver: rename `minimumBatchInterval`  to `defaultCompactionSleepInterval` and `defaultCompactBatchLimit` to `defaultCompactionBatchLimit`

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
(cherry picked from commit 2c53be7)
JalinWang pushed a commit to JalinWang/etcd that referenced this pull request Aug 30, 2024
This is a backporting cherry-pick of the following commits:

- add flagsline

Signed-off-by: Jalin Wang <JalinWang@outlook.com>

- etcdserver: rename defaultCompactionSleepInterval var (etcd-io#18495)

etcdserver: rename `minimumBatchInterval`  to `defaultCompactionSleepInterval` and `defaultCompactBatchLimit` to `defaultCompactionBatchLimit`

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
(cherry picked from commit 2c53be7)

- test: add CompactionSleepInterval in FakeStore's config

After setting the ComparionSleepInterval, we can use time.Ticker
instead of time.After to optimize the scheduleComparison(),
otherwise it will fail in the 'TestStoreCompact(t)' test.

Signed-off-by: guozhao <guozhao@360.cn>
(cherry picked from commit fab8474)

- add sleep interval

(cherry picked from commit 184b0e5)
Signed-off-by: Jalin Wang <JalinWang@outlook.com>
@JalinWang JalinWang deleted the fix/rename_defaultBatchInterval branch September 9, 2024 02:07
aneesh1 pushed a commit to DataDog/etcd that referenced this pull request Sep 25, 2024
This is a backporting cherry-pick of the following commits:

- add flagsline

Signed-off-by: Jalin Wang <JalinWang@outlook.com>

- etcdserver: rename defaultCompactionSleepInterval var (etcd-io#18495)

etcdserver: rename `minimumBatchInterval`  to `defaultCompactionSleepInterval` and `defaultCompactBatchLimit` to `defaultCompactionBatchLimit`

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
(cherry picked from commit 2c53be7)

- test: add CompactionSleepInterval in FakeStore's config

After setting the ComparionSleepInterval, we can use time.Ticker
instead of time.After to optimize the scheduleComparison(),
otherwise it will fail in the 'TestStoreCompact(t)' test.

Signed-off-by: guozhao <guozhao@360.cn>
(cherry picked from commit fab8474)

- add sleep interval

(cherry picked from commit 184b0e5)
Signed-off-by: Jalin Wang <JalinWang@outlook.com>
a-nych pushed a commit to a-nych/etcd that referenced this pull request Oct 16, 2024
* etcdserver: rename `minimumBatchInterval`  to `defaultCompactionSleepInterval` and `defaultCompactBatchLimit` to `defaultCompactionBatchLimit`

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
a-nych pushed a commit to a-nych/etcd that referenced this pull request Oct 16, 2024
* etcdserver: rename `minimumBatchInterval`  to `defaultCompactionSleepInterval` and `defaultCompactBatchLimit` to `defaultCompactionBatchLimit`

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
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.

6 participants