You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by iilyak <gi...@git.apache.org> on 2016/05/24 22:56:48 UTC

[GitHub] couchdb-fabric pull request: Use meck:wait to fix race condition

GitHub user iilyak opened a pull request:

    https://github.com/apache/couchdb-fabric/pull/52

    Use meck:wait to fix race condition

    fabric:update_docs is running in the context of a `read_repair` which is an
    independent process started using `erlang:spawn/1`. This leads to a race
    when we try to use `meck:history(fabric)`. Use of `meck:wait` ensures that
    we call `meck:history` after `fabric:update_docs` has been called.

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

    $ git pull https://github.com/cloudant/couchdb-fabric use_meck_wait

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

    https://github.com/apache/couchdb-fabric/pull/52.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 #52
    
----
commit 19e9959aab87c8050d280f5d255d58cf1a995614
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2016-05-24T22:52:25Z

    Use meck:wait to fix race condition
    
    fabric:update_docs is running in the context of a `read_repair` which is an
    independent process started using `erlang:spawn/1`. This leads to a race
    when we try to use `meck:history(fabric)`. Use of `meck:wait` ensures that
    we call `meck:history` after `fabric:update_docs` has been called.

----


---
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-fabric pull request: Use meck:wait to fix race condition

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

    https://github.com/apache/couchdb-fabric/pull/52


---
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-fabric pull request: Use meck:wait to fix race condition

Posted by nickva <gi...@git.apache.org>.
Github user nickva commented on the pull request:

    https://github.com/apache/couchdb-fabric/pull/52#issuecomment-221429501
  
    +1 
    
    Nice. Didn't know about meck:wait. Could probably use it in other places where we have sleeps and race conditions.


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