-
Notifications
You must be signed in to change notification settings - Fork 19
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
add etcd compact #18
add etcd compact #18
Conversation
metadium/admin.go
Outdated
log.Error("Metadium - failed to log the latest block", | ||
"height", height, "hash", hash, "took", time.Since(tstart)) | ||
} else { | ||
log.Info("Metadium - logged the latest block", | ||
"height", height, "hash", hash, "took", time.Since(tstart)) | ||
|
||
if (rev%etcdCompactFrequency == 0) && (rev > 100) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't "100" be replaced by etcdCompactFrequency? I.e.
if rev%etcdCompactFreqency == 0 && rev > etcdCompactFreqency {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added distinct var, named etcdCompactWindow
, for more generalization and flexibility.
etcdCompactWindow
is set to 100 as default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, I updated codes to apply concept of compact window. Please check the following commits: 73062f1
* apply concept of compact window * update check logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
etcdPut
spec: now return revision infoetcdCompact
afteretcdPut
(at everyrev%100==0
)etcdCompactFrequency
is 100 as default