Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To predict future compaction results, we log pre-compaction and
post-compaction file sizes. These log results will be used as data
points for regression analysis.
COUCHDB-3417
Overview
Users sometimes want to know the results of compaction and how much disk space will be freed up. Unfortunately, using simply data size and disk size to calculate this prediction is misleading due to conflicts and attachments. This approach logs disk size pre and post compaction for db and view shard files. The hope is that with enough data points, users can run regression analysis to heuristically determine a compaction result.
Testing recommendations
To see the output, one can connect to a node and run compaction on db or view to see the log result.
{ok, Db} = couch_db:open(<<"shards/00000000-1fffffff/mydb.1494471596">>, []).
couch_db:start_compact(Db).
JIRA issue number
COUCHDB-3417
Related Pull Requests
Checklist
with the correct commit hash once this PR get merged.