couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Andrey Somov
Hi all, when I read the code in couch_server.terminate() function I see the following in the trunk: terminate(_Reason, _Srv) - [couch_util:shutdown_sync(Pid) || {_, {Pid, _LruTime}} - ets:tab2list(couch_dbs_by_name)], ok. It looks like the values in the couch_dbs_by_name

Re: couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Filipe David Manana
It seems to me you're right about it. Do you want to provide a small patch to fix it? (Ideally in a Jira ticket) Thanks Andrey On Wed, Jun 15, 2011 at 10:30 AM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, when I read the code in couch_server.terminate() function I see the

Re: couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Filipe David Manana
Andrey, I would note that in general list comprehensions are a bit dangerous besides mapping they also allow filtering. If that code was written as: lists:foreach( fun({_, {Pid, _LruTime}}) - couch_util:shutdown_sync(Pid) end, ets:tab2list(couch_dbs_by_name)) We would have noticed before

Re: couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Andrey Somov
The bug has been introduced more then a year ago (02-Apr-2010) in revision 930363 with the comment Deterministic/synchronous shutdown code Since no one is complaining may be the code is redundant and it can be safely removed ? (the less code the better) - Andrey

Re: couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Filipe David Manana
On Wed, Jun 15, 2011 at 11:54 AM, Andrey Somov trophyb...@googlemail.com wrote: The bug has been introduced more then a year ago (02-Apr-2010) in revision 930363 with the comment Deterministic/synchronous shutdown code Since no one is complaining may be the code is redundant and it can be

Re: couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Andrey Somov
My problem is that I never managed to pass ALL the tests. Some of the tests (both Etap and JavaScript) fail in trunk and in branches. (I even came to the conclusion that developers do not run all the tests before each and every commit.) That is why I cannot really trust the patch I can provide.

Re: couch_server.erl - is couch_dbs_by_name table correclty used in terminate() function ?

2011-06-15 Thread Filipe David Manana
On Wed, Jun 15, 2011 at 2:08 PM, Andrey Somov trophyb...@googlemail.com wrote: My problem is that I never managed to pass ALL the tests. Some of the tests (both Etap and JavaScript) fail in trunk and in branches. (I even came to the conclusion that developers do not run all the tests before