You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by eiri <gi...@git.apache.org> on 2016/08/16 01:51:03 UTC

[GitHub] couchdb-couch pull request #191: Simplify proc manager by moving assignment ...

GitHub user eiri opened a pull request:

    https://github.com/apache/couchdb-couch/pull/191

    Simplify proc manager by moving assignment logic in one place

    This changes how proc manager handles proc assignment. Instead of doing this in three different places: `get_proc` call handler, `return_proc/2` with `maybe_assign_proc` and `flush_waiters/2`, proc manager now just places all the incoming requests in the waiting queue and then flushes it. 
    
    As a result all the logic kept in one place which makes it more obvious that we are treating proc management as a processing of a single FIFO queue with "soft" and "hard" upper limits.
    
    Consequently this is fixing a bug in `maybe_assign_proc` where it was possible to assign a client a process that wasn't aware of it.
    
    COUCHDB-3095

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch 66640-simplify-proc_manager

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/191.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #191
    
----
commit 7dceb1a0fe887a63633add50917a33f1c6cd439b
Author: Eric Avdey <ei...@eiri.ca>
Date:   2016-08-11T20:45:32Z

    Fix maybe_assign_proc/2

commit f9e4df3a29012bc762986ad266bcd36535728bcc
Author: Eric Avdey <ei...@eiri.ca>
Date:   2016-08-11T20:51:22Z

    Convert find_proc into helper
    
    Make find_proc into a helper that always returns proc
    from an idle pool if it is available there.
    
    Move response logic back into get_proc call handler
    for better visibility of what's going on there.

commit 030284c85c8c3b9a5d98ba066d2634e648626bcd
Author: Eric Avdey <ei...@eiri.ca>
Date:   2016-08-15T13:00:53Z

    Move process allocation logic in flush_waiters/2
    
    Instead of keeping proc allocation logic in three places:
    in get_proc call handler, return_proc and flush_waiters
    now we're just placing new requestors in waiting list
    and flush, keeping all assignment and allocation there.

commit 9ce3bb36c53b4ea6599d17427667eae972e6836d
Author: Eric Avdey <ei...@eiri.ca>
Date:   2016-08-15T13:10:49Z

    Remove obsolete helper functions

commit 9b41e3d90f1b0ceaddedd473f65278240c1c2a4f
Author: Eric Avdey <ei...@eiri.ca>
Date:   2016-08-15T16:45:20Z

    Add tests for re-use of procs, proper waiters dequeue and idle pool reduction

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request #191: Simplify proc manager by moving assignment ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/191


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #191: Simplify proc manager by moving assignment logic i...

Posted by eiri <gi...@git.apache.org>.
Github user eiri commented on the issue:

    https://github.com/apache/couchdb-couch/pull/191
  
    @davisp Here is the redo we talked about.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #191: Simplify proc manager by moving assignment logic i...

Posted by eiri <gi...@git.apache.org>.
Github user eiri commented on the issue:

    https://github.com/apache/couchdb-couch/pull/191
  
    Reference on conversation about this change #190 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #191: Simplify proc manager by moving assignment logic i...

Posted by davisp <gi...@git.apache.org>.
Github user davisp commented on the issue:

    https://github.com/apache/couchdb-couch/pull/191
  
    Awesome work. +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---