couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell van der Walt (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-926) Compaction does not release file descriptors
Date Wed, 27 Oct 2010 07:56:20 GMT

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

Russell van der Walt commented on COUCHDB-926:
----------------------------------------------

Sorry, I just realized I didn't actually answer your last question.

Having dug around a bit more, I can confirm that it only if the view file is open.

If you compact the database without opening the database after a restart, no problem.
If you compact the database after opening it, but not querying any of the views, no problem.

If however you compact after querying a view, file handles are left behind.

If appears that both views and database files are left behind:

Before compaction:

root@ubuntu904:~# lsof | grep -P 'COMMAND|/var/data/couchdb/'
COMMAND     PID       USER   FD      TYPE             DEVICE      SIZE       NODE NAME
beam      22022       root   13u      REG              252,0      4185    3653752 /var/data/couchdb/_users.couch
beam      22022       root   20u      REG              252,0  18128988    3653679 /var/data/couchdb/storage-test.couch
beam      22022       root   21u      REG              252,0     12377    3884278 /var/data/couchdb/.storage-test_design/800b1d5fe6334f272f2a8ad9feb9e0d9.view

After compaction:

root@ubuntu904:~# lsof | grep -P 'COMMAND|/var/data/couchdb/'
COMMAND     PID       USER   FD      TYPE             DEVICE      SIZE       NODE NAME
beam      22022       root   13u      REG              252,0      4185    3653752 /var/data/couchdb/_users.couch
beam      22022       root   20u      REG              252,0  18128988    3653679 /var/data/couchdb/.delete/3d7816bb09602b0ac9092e1d9fba9172
(deleted)
beam      22022       root   21u      REG              252,0     12377    3884278 /var/data/couchdb/.delete/cb1436e9818a0fde236d7e130cf02fbe
(deleted)
beam      22022       root   23u      REG              252,0      4185    3884279 /var/data/couchdb/.storage-test_design/800b1d5fe6334f272f2a8ad9feb9e0d9.view
beam      22022       root   25u      REG              252,0     32860    3654908 /var/data/couchdb/storage-test.couch


> Compaction does not release file descriptors
> --------------------------------------------
>
>                 Key: COUCHDB-926
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-926
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 1.0.1
>         Environment: Ubuntu 9.04/10.4
>            Reporter: Russell van der Walt
>             Fix For: 1.0.2, 1.1
>
>
> When couch compacts a database, file descriptors of the deleted files are left open,
causing the freed disk space to not be released to the system. With regular compaction, the
system eventually runs out of disk space.
> There is a conversation thread in the user mailing list titled "Couch not releasing deleted
files" that gives more insight into the problem, but I have been unable to find a bug report
for it, so please accept my apologies if this has already been dealt with.

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


Mime
View raw message