nickva opened a new issue, #4263:
URL: https://github.com/apache/couchdb/issues/4263

   This is a proposal to alter the calculation of active db size to include 
only the leaf revisions, when previously it included both leaf and intermediate 
(internal) revisions. 
   
   Currently, when users delete a large document, active size goes up instead 
of decreasing. Since our automated (smoosh) compaction uses the difference of 
file size to active size, compaction never triggers. Users may delete 1000 
documents, 1MB each without triggering compaction which should have freed 1GB 
of disk space. From a user's point of view this behavior is quite surprising.
   
   The proposal is that deleting all those documents should trigger compaction 
and that disk space should be freed. To make that happen, redefine active size 
to count only leaf revision sizes. In this way, as soon as the user deletes a 
document, the original document revision becomes and intermediate node, and the 
deleted revision (usually with a `body={}`) becomes the new leaf, which should 
make the active size decrease. The auto-compactor (smoosh) should enqueue the 
updated shard for compaction roughly with priority `FileSize - ActiveSize` (in 
the slack db channel) or `FileSize / ActiveSize` (in the ratio db channel).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to