Re: CouchDb not releasing files

2010-09-27 Thread [mRg]
Filipe, Thanks very much for looking at this, I'll get one of our guys to check out the code and put it on one of our servers, we can normally tell pretty quickly if its working or not. Will let you know the results Stephen On 25 September 2010 17:15, Filipe David Manana fdman...@apache.org

Re: CouchDb not releasing files

2010-09-25 Thread Filipe David Manana
Stephen, I committed something to trunk ( http://svn.apache.org/viewvc?view=revisionrevision=1001196 ) that might be the cause for your issue. Can you test it with trunk? I was not yet able to reproduce the issue. cheers On Wed, Sep 22, 2010 at 2:40 PM, [mRg] emar...@gmail.com wrote: Yes I

Re: CouchDb not releasing files

2010-09-25 Thread Robert Dionne
Filipe, Won't terminate be called only if the gen_server is stopped for a reason? Bob On Sep 25, 2010, at 7:30 AM, Filipe David Manana wrote: Stephen, I committed something to trunk ( http://svn.apache.org/viewvc?view=revisionrevision=1001196 ) that might be the cause for your issue.

Re: CouchDb not releasing files

2010-09-25 Thread Paul Davis
I'm not aware of a case where a gen_server will stop without calling terminate except if its a hard VM shutdown. Though, I get the feeling that Kocoloski is going to remind me of a case I've seen before and I'll say Oh duh! and then move on with my life. HTH, Paul Davis On Sat, Sep 25, 2010 at

Re: CouchDb not releasing files

2010-09-25 Thread Robert Dionne
http://erldocs.com/otp_src_R13B/stdlib/gen_server.html If the function returns {stop,Reason,Reply,NewState}, Reply will be given back to From. If the function returns {stop,Reason,NewState}, any reply to From must be given explicitly using gen_server:reply/2. The gen_server will then call

Re: CouchDb not releasing files

2010-09-25 Thread Randall Leeds
What about if an exit() is called or something? I think then terminate is still called, but worth checking. On Sat, Sep 25, 2010 at 16:57, Robert Dionne dio...@dionne-associates.com wrote: http://erldocs.com/otp_src_R13B/stdlib/gen_server.html If the function returns

Re: CouchDb not releasing files

2010-09-25 Thread Robert Dionne
couch_file has a close function which presumably does the right thing, but it's only called from couch_db_update:terminate On Sep 25, 2010, at 11:02 AM, Randall Leeds wrote: What about if an exit() is called or something? I think then terminate is still called, but worth checking. On

Re: CouchDb not releasing files

2010-09-25 Thread Randall Leeds
On Sat, Sep 25, 2010 at 17:07, Robert Dionne dio...@dionne-associates.com wrote: couch_file has a close function which presumably does the right thing, but it's only called from couch_db_update:terminate It just shuts down the process. The question on the table is whether that will close the

Re: CouchDb not releasing files

2010-09-25 Thread Robert Dionne
On Sep 25, 2010, at 11:15 AM, Randall Leeds wrote: On Sat, Sep 25, 2010 at 17:07, Robert Dionne dio...@dionne-associates.com wrote: couch_file has a close function which presumably does the right thing, but it's only called from couch_db_update:terminate It just shuts down the

Re: CouchDb not releasing files

2010-09-25 Thread Filipe David Manana
couch_file gen_server will eventually be shutdown through the reference counter pointed to by the the #db{} record. Key places to look at: http://github.com/fdmanana/couchdb/blob/trunk/src/couchdb/couch_db_updater.erl#L404 and

Re: CouchDb not releasing files

2010-09-25 Thread Randall Leeds
On Sat, Sep 25, 2010 at 17:47, Robert Dionne dio...@dionne-associates.com wrote: On Sep 25, 2010, at 11:15 AM, Randall Leeds wrote: On Sat, Sep 25, 2010 at 17:07, Robert Dionne dio...@dionne-associates.com wrote: couch_file has a close function which presumably does the right thing, but

Re: CouchDb not releasing files

2010-09-25 Thread Paul Davis
Bob, If memory serves, this thread doesn't have anything to do with the couch_db_updater not functioning properly. I thought all the unlreased files were related to views, and more specifically, view compaction. Ie, its quite possible that calling couch_file:stop in the proper place would've

Re: CouchDb not releasing files

2010-09-25 Thread Robert Dionne
I see, cool. I just saw the patch, was wondering how all these terminate functions were being called, and started refreshing my memory on these bits. They aren't all that intuitive. Well it's a good idea to try it, as it's harmless and might fix the problem. Thanks Filipe, Randall, and Paul,

Re: CouchDb not releasing files

2010-09-25 Thread Filipe David Manana
On Sat, Sep 25, 2010 at 5:12 PM, Robert Dionne dio...@dionne-associates.com wrote: I see, cool. I just saw the patch, was wondering how all these terminate functions were being called, and started refreshing my memory on these bits. They aren't all that intuitive. True. Well it's a good

Re: CouchDb not releasing files

2010-09-22 Thread [mRg]
Yes I did, issued it a couple of times as I was trying to see if its was some kind of race condition. Have a site due to launch on Friday so have got crazy busy but ill post more info when I have it, unless anyone else can try and help replicate this ? On 20 September 2010 21:42, Paul Davis

Re: CouchDb not releasing files

2010-09-20 Thread Chris Anderson
On Sun, Sep 19, 2010 at 3:21 PM, Randall Leeds randall.le...@gmail.com wrote: If the bug is confirmed it should be on JIRA if it is not already. If you have a test case that reproduces it that would be fanstastic (bonus points for a JS test in Futon). It's my opinion something this serious

Re: CouchDb not releasing files

2010-09-20 Thread [mRg]
I am trying to reproduce it currently on a fresh VM. It seems to be a symptom of view compaction, after the file is moved to the .delete directory and then finally deleted is where the problem seems to occur. I tried with a fresh ubuntu 10.10 but I couldnt reproduce but the system I'm seeing it

Re: CouchDb not releasing files

2010-09-20 Thread [mRg]
Well I can certainly reproduce the issue, but am having trouble finding the exact sequence (annoyingly of course) 1 I started with a blank VM of Ubuntu 10.10 (ext3) running on virtualbox with latest CouchDB (apt-get install couchdb) 2 Began adding lots of blank docs .. (curl -X POST -H

Re: CouchDb not releasing files

2010-09-20 Thread Paul Davis
Do you issue two compact commands simultaneously or wait for the first one to complete and then run the second? On Mon, Sep 20, 2010 at 4:07 PM, [mRg] emar...@gmail.com wrote: Well I can certainly reproduce the issue, but am having trouble finding the exact sequence (annoyingly of course) 1

CouchDb not releasing files

2010-09-19 Thread [mRg]
Hi all, This is just a cross-post to highlight a thread on the user list. (with the same name as this one - all details etc are on there, happy to repeat here if needed). It seems this problem was discussed by some devs at CouchCamp and seems others are suffering this issue. I was just wondering