desktopcouch should compact its databases

Bug #427905 reported by Guillermo Gonzalez
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bindwood
Invalid
Undecided
Unassigned
desktopcouch
Fix Released
Medium
Unassigned

Bug Description

Using bindwood I got a 2.6GB database, see Bug #427622
After compacting the DB the size is: 0.6MB

Revision history for this message
Chad Miller (cmiller) wrote :

The Ubuntu team will not stand for unnecessary disc usage. We have a service daemon that runs while d-c is running, and it currently manages replication. There's no reason it can't also clean up the databases occasionally.

tags: added: cmiller-k-alpha6
Changed in desktopcouch:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Chad Miller (cmiller)
milestone: none → w21-karmic-alpha6
Chad Miller (cmiller)
Changed in desktopcouch:
milestone: w21-karmic-alpha6 → w23-karmic-beta
tags: added: cmiller-k-beta
removed: cmiller-k-alpha6
tags: added: ubuntuone-karmic
Revision history for this message
Chad Miller (cmiller) wrote :

Compacting is a good idea, but the example rationale is strange.

That bug#427622 is marked as invalid at present.

Changed in desktopcouch:
importance: Critical → Medium
Revision history for this message
Stuart Langridge (sil) wrote :

Bug 427622 is invalid because Bindwood no longer has the problem that caused it to create a huge database. There is nothing stopping other applications using desktopcouch from making the same mistake, though (repeatedly writing the same data to a document, which creates extra revisions and balloons the size of the DB, almost all of which is recovered by compacting), which is why we should guard against that.

Revision history for this message
Elliot Murphy (statik) wrote :

Marked the bindwood bug task as invalid. If it's easier, compacting desktopcouch at startup rather than with a cron job would be fine.

Changed in bindwood:
status: New → Invalid
Elliot Murphy (statik)
tags: removed: ubuntuone-karmic
summary: - desktopcouch should add a cron job to compact its databases
+ desktopcouch should compact its databases
Changed in desktopcouch:
milestone: w23-karmic-beta → 1.0
Chad Miller (cmiller)
Changed in desktopcouch:
milestone: 1.0 → 1.1
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

I think having an option for desktopcouch to automatically compact databases periodically might be nice, but for many applications (ahem, dmedia), the application can do a better job of deciding when compaction is needed, when doing the compaction wont affect user experience.

So if this feature is implemented, I'd really want an easy way for an app to opt-out of the auto-compaction (maybe through something similar to excluded_names).

I'm not thrilled about the idea of having some (or all) the databases automatically compact when deskcouch first starts. The desktopcouch startup is already a bit sluggish, and compacting the databases could cause a lot of IO at an inopportune time.

In some ways I think educating app developers about compaction might be a better solution. My two cents. :)

Chad Miller (cmiller)
Changed in desktopcouch:
assignee: Chad Miller (cmiller) → nobody
JACQUELINE (ijdisabest)
Changed in desktopcouch:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.