[
https://issues.apache.org/jira/browse/COUCHDB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925292#action_12925292
]
Russell van der Walt commented on COUCHDB-926:
----------------------------------------------
Hi Adam,
Have now confirmed that it is only applicable to databases with views. No view,
no problem.
I set up a test that simply kept updating a single document in a loop (and
touching the view after every update), with the following map function:
function(doc) { if (doc.type && doc.type == 'record') { emit(doc.id, null); } }
I let that run for a bit and then when exiting the loop, compacted the database
and the views. The database and view file size goes down as expected, but "df"
does not show an increase in free size.
lsof has the following output which I reckon sums it up nicely:
r...@ubuntu904:~# lsof | grep -P 'COMMAND|/var/data/couchdb/'
COMMAND PID USER FD TYPE DEVICE SIZE
NODE NAME
beam 21197 root 13u REG 252,0 4185
3653752 /var/data/couchdb/_users.couch
beam 21197 root 14u REG 252,0 191959757
3653679 /var/data/couchdb/.delete/33acca4299388cfa73e271ca6b662518 (deleted)
beam 21197 root 18u REG 252,0 8281
3884279
/var/data/couchdb/.storage-test_design/800b1d5fe6334f272f2a8ad9feb9e0d9.view
beam 21197 root 20u REG 252,0 36956
3654908 /var/data/couchdb/storage-test.couch
Note the deleted view file still being held open by beam.
Hope this helps.
> 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.