-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Periodic Compactor keeps revisions up to 2 * periodInHour
#7868
Comments
@yudai Sounds like a better way to do it. Submit a PR? Thanks! |
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
Oops, Created a PR anyway. |
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
yudai
pushed a commit
to yudai/etcd
that referenced
this issue
May 4, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I have a question about the periodic compactor.
Issue Observed
ETCD servers keep revisions older than a configured retention hours.
Issue Detail
The
Periodic
compactor runs a compaction everyperiodInHour
.This means:
periodInHour
ago2 * periodInHour
agoImpact for Operation
Estimating DB usage is difficult with larger auto compaction retention hours.
For example, with 24 hours retention, etcd sometimes has revisions made last 24 hours (just after a compaction), and sometimes revisions made last 48 hours (just before a compaction). So even when you set 24 hour retention time, you need to estimate the usage of 48 hours.
This makes dealing with the 8GB max db size pretty harder. Also defrag takes much time after a compaction with longer retention hours.
Suggested Resolution
To make the compactor run a compaction every hour, which keeps revisions up to
periodInHour + 1
(this might be good to prevent spikes by large compactions?).Side Note
I assume that the compactor is supposed to run a compaction every hour from the beginning? Because,
t.revs
andgetRev()
are not necessary for the current behavior.Question
Is the current behavior of the periodic compacter intended?
If not, I'll send a PR to fix it.
The text was updated successfully, but these errors were encountered: