couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dionne <dio...@dionne-associates.com>
Subject Re: [jira] Commented: (COUCHDB-397) POST _restart only restarts couch_server process
Date Tue, 30 Jun 2009 12:03:44 GMT
On Jun 29, 2009, at 4:42 PM, Adam Kocoloski (JIRA) wrote:

>
>    [ https://issues.apache.org/jira/browse/COUCHDB-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725336

> #action_12725336 ]
>
> Adam Kocoloski commented on COUCHDB-397:
> ----------------------------------------
>
> Hi Paul, I probably shouldn't have brought up the whole  
> exit(couch_config, blah) thing.  Let's focus on the supervisor  
> behavior.
>
> The trunk code *does not* restart any secondary services.  AFAICT  
> these lines are a no-op:
>
>    supervisor:terminate_child(couch_secondary_services, couch_server),
>    supervisor:restart_child(couch_secondary_services, couch_server).
>
> There is no child of couch_secondary_services named couch_server.   
> Damien should comment on the rationale.  Perhaps what was intended was
>
>    supervisor:terminate_child(couch_server_sup,  
> couch_secondary_services),
>    supervisor:restart_child(couch_server_sup,  
> couch_secondary_services).
>
> That change would also fix COUCHDB-398 -- it just restarts a bit  
> more of the application than what I posted.
>
> Not sure where I made a comment that indicated my diff in  
> COUCHDB-398 didn't work.  I've checked -- it does reset the stats  
> counters, and the test suite does pass.
>
> I think having a working _restart handler would actually be kinda  
> useful, much like the _log handler Jan implemented a while back.

Adam,

   Thanks for finding this stats bug, I've been randomly seeing it for  
some time and it was annoying. Actually I was just reviewing  
couch_log, in light of your comments in COUCHDB-355 about  
couch_db_update_notifier_sup. It should do a similar thing to  
couch_log when the config changes and an empty value is set, stop the  
module and let it restart.

   However looking at couch_log I'm not sure if the stop function  
works correctly as it calls couch_event_sup:stop(couch_log), passing  
an atom, where the couch_event_sup function wants a Pid. Seems odd?

Cheers,

Bob
>
> I propose that /_restart should gracefully restart the entire couch  
> application, not just the couch_server process.  Cheers, Adam
>
>
>
>> POST _restart only restarts couch_server process
>> ------------------------------------------------
>>
>>                Key: COUCHDB-397
>>                URL: https://issues.apache.org/jira/browse/COUCHDB-397
>>            Project: CouchDB
>>         Issue Type: Bug
>>   Affects Versions: 0.9
>>           Reporter: Adam Kocoloski
>>           Assignee: Adam Kocoloski
>>
>> Perhaps this is by design, but POSTing to /_restart only restarts  
>> the couch_server process.  It does not restart any of the other  
>> myriad processes CouchDB relies on for operation.  In particular,  
>> this causes the stats test suite to occasionally fail, because the  
>> stats counters do not get reset.  The test that fails is
>> Assertion 'open_databases > 0 && max >= open_databases, name'  
>> failed: should keep the same number of open databases when reaching  
>> the max_dbs_open limit
>
> -- 
> 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