couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <>
Subject [jira] Commented: (COUCHDB-753) Add config option for view compact dir
Date Sun, 30 May 2010 17:39:37 GMT


Filipe Manana commented on COUCHDB-753:

I just implemented a solution where:

- when creating a new DB, couch_server will select one directory in a round-robin fashion
- when compacting a DB, one of the directories is also selected in a round-robin fashion to
store the compaction file
- when compaction finishes, the new DB file is not moved from one directory to another (avoiding
expensive IO)

For example, if we have 2 DB dirs and we create 6 DBs, each DB dir will have 3 DBs. This is
great if each directory maps to a different IO device.

The code is at
It includes a comprehensive Etap test case.

I'll attach a patch here if I get positive feedback.

If there's no objection to this approach, I'll do the same but for supporting multiple view
index directories. Although this makes sense to go into a separate patch.

> Add config option for view compact dir
> --------------------------------------
>                 Key: COUCHDB-753
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>            Reporter: Till Klampaeckel
> CouchDB creates a "foo.view.compact" file in the view directory ("view_index_dir") when
you run compact against a view.
> I'd really like to be able to specify another directory where this ".compact" file is
created and worked on. This is especially helpful when it's difficult to run compaction because
you run out of disk space on the same device.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message