[ 
https://issues.apache.org/jira/browse/COUCHDB-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873462#action_12873462
 ] 

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  http://github.com/fdmanana/couchdb/compare/multiple_db_dirs
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: https://issues.apache.org/jira/browse/COUCHDB-753
>             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.

Reply via email to