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

Inconsistent documentation in compaction period comments #19017

Open
4 tasks done
wodeyoulai opened this issue Dec 6, 2024 · 0 comments
Open
4 tasks done

Inconsistent documentation in compaction period comments #19017

wodeyoulai opened this issue Dec 6, 2024 · 0 comments
Labels

Comments

@wodeyoulai
Copy link

Bug report criteria

What happened?

There appears to be an inconsistency in the comments describing the compaction period logic. In the current implementation, the comments show conflicting time periods:

Current comments:

Compaction period 24-hour:
  1. compute compaction period, which is 1-hour      // Inconsistent with 24-hour period
  2. record revisions for every 1/10 of 1-hour (6-minute)  // Should be 1/10 of 24-hour (144-minute)
  3. keep recording revisions with no compaction for first 24-hour
  4. do compact with revs[0]
    - success? continue on for-loop and move sliding window; revs = revs[1:]
    - failure? update revs, and retry after 1/10 of 1-hour (6-minute)  // Should be 144-minute

### What did you expect to happen?

Compaction period 24-hour:
  1. compute compaction period, which is 24-hour
  2. record revisions for every 1/10 of 24-hour (144-minute)
  3. keep recording revisions with no compaction for first 24-hour
  4. do compact with revs[0]
    - success? continue on for-loop and move sliding window; revs = revs[1:]
    - failure? update revs, and retry after 1/10 of 24-hour (144-minute)

### How can we reproduce it (as minimally and precisely as possible)?

server/etcdserver/api/v3compactor/periodic.go

### Anything else we need to know?

_No response_

### Etcd version (please run commands below)

<details>

```console
$ etcd --version
latest

$ etcdctl version
# paste output here

Etcd configuration (command line flags or environment variables)

paste your configuration here

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

$ etcdctl member list -w table
# paste output here

$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here

Relevant log output

No response

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

No branches or pull requests

1 participant