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

support <1hr automatic compaction retention #8503

Closed
heyitsanthony opened this issue Sep 5, 2017 · 3 comments · Fixed by #8563
Closed

support <1hr automatic compaction retention #8503

heyitsanthony opened this issue Sep 5, 2017 · 3 comments · Fixed by #8563
Assignees

Comments

@heyitsanthony
Copy link
Contributor

Systems (e.g., k8s) that expect a lot of writes must implement their own compaction logic to periodically compact etcd at a rate of less than an hour. That is, some agent outside of etcd must be granted ownership of compaction which complicates system design. Since the intent is only etcd should compact more frequently, it would be much simpler to support automatic retention with finer granularity.

Currently the flag for configuring the compaction interval is an integer:

         --auto-compaction-retention '0'
                auto compaction retention length. 0 means disable auto compaction.

It could instead be parsed from a string:

        --auto-compaction-mode 'periodic'
                'periodic' means hours if an integer or a duration string otherwise, 'revision' means revision numbers to retain by auto compaction

Then, etcd can get 5 minute retention via time.ParseDuration:

--auto-compaction-retention 5m

Related #8458

@fanminshi
Copy link
Member

@heyitsanthony should we have a minimum retention?

@heyitsanthony
Copy link
Contributor Author

@fanminshi no, if the user gives a very short retention time, that's on them

@fanminshi
Copy link
Member

@heyitsanthony got it.

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

Successfully merging a pull request may close this issue.

2 participants