ahrtr / etcd-defrag

An easier to use and smarter etcd defragmentation tool
MIT License
85 stars 9 forks source link

Adding new variables in defragmentation rule/Adding #5

Closed CaojiamingAlan closed 1 year ago

CaojiamingAlan commented 1 year ago

I think it will be convenient if we add the following defragmentation rule variables, so that we don't need to write expressions manually: dbQuotaUsage = dbSize/dbQuota dbSizeUnused = dbSize - dbSizeInUse

I can make a pull request to work on these.

ahrtr commented 1 year ago

Thanks @CaojiamingAlan for raising this.

It makes sense to me. Only one minor comment, I think the naming dbSizeFree is a little better than dbSizeUnused. There is no suffix "ed" in "dbSizeInUse", it's a little inconsistent if we use dbSizeUnused.

Please feel free to deliver a PR. thx

ahrtr commented 1 year ago

Resolved in https://github.com/ahrtr/etcd-defrag/pull/6