couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-901) refactor os process management
Date Wed, 29 Sep 2010 18:03:33 GMT

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

Paul Joseph Davis commented on COUCHDB-901:
-------------------------------------------

Its not a full switch to emonk, just a refactor to allow supporting emonk as well as some
other bits to make the various server process handling less funky.

The other major thing I did was to split couch_query_servers into two sets of modules. couch_view_server
for map/reduce views, and couch_app_server for everything else. Each set of modules has an
API module and a set of implementation modules. For instance:

couch_view_server.erl 
couch_view_server_emonk.erl
couch_view_server_erlang.erl
couch_view_server_os.erl

All calls from external code go to couch_view_server that returns an opaque term that ends
up calling out to the actual implementation module.

The main things missing from my code are finishing the implementations for the non-emonk app
servers and some refactoring in a few places so that things like couch_view_server_os.erl
and couch_app_server_os.erl share the same code for managing OS level processes. The couch_proc_manager.erl
in Adam's patch looks like exactly what I need for this so that'll help.



> refactor os process management
> ------------------------------
>
>                 Key: COUCHDB-901
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-901
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Adam Kocoloski
>             Fix For: 1.1
>
>
> Wanted to make sure this doesn't get forgotten in the planning for 1.1.  Paul Davis and
I independently refactored couch_query_servers.  Paul's work is much more comprehensive and
includes a switch to emonk:
> http://github.com/davisp/couchdb/tree/emonk
> The work I did is here
> http://github.com/kocolosk/couchdb/tree/COUCHDB-901
> One feature not included in that branch is the ability to limit the number of OS processes.
 Should be simple to add if my work ends up being merged.  I did the refactor because I was
having problems with couch_query_servers "forgetting" about OS processes in BigCouch.  One
of the ets tables held by couch_query_servers would list thousands of processes (and in fact
there were thousands of spawned couchjs), but another table would claim that only two were
running.  After digging through the code a while I became frustrated with all of the tracking
of multiple ets tables and rewrote a server that used only one table.  Other changes include
> * ability to reuse an OS process when the client that requested it dies.
> * better behavior under config changes - doesn't kill all query servers when [query_servers]
or [native_query_servers] block changes

-- 
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