You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by rnewson <gi...@git.apache.org> on 2016/07/12 11:09:10 UTC

[GitHub] couchdb-fabric pull request #63: End the listener if any shard is deleted

GitHub user rnewson opened a pull request:

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

    End the listener if any shard is deleted

    If a database is deleted and recreated the underlying shards have a
    new name. Since we're watching the old names, we will never again see
    an updated event. So, we stop this process if any watched shard is
    deleted and it's someone elses job to recreate the listener for the
    new shards.
    
    COUCHDB-3054

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

    $ git pull https://github.com/cloudant/couchdb-fabric 3054-invalidate-promptly

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

    https://github.com/apache/couchdb-fabric/pull/63.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 #63
    
----
commit ebea1b8f5d49fe60f326b33dbdc06176ecfea5d1
Author: Robert Newson <rn...@apache.org>
Date:   2016-07-12T11:06:24Z

    End the listener if any shard is deleted
    
    If a database is deleted and recreated the underlying shards have a
    new name. Since we're watching the old names, we will never again see
    an updated event. So, we stop this process if any watched shard is
    deleted and it's someone elses job to recreate the listener for the
    new shards.
    
    COUCHDB-3054

----


---
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 issue #63: End the listener if any shard is deleted

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

    https://github.com/apache/couchdb-fabric/pull/63
  
    It means this patch is a bust, but we're heading in the right direction. This patch identifies a real bug, it just doesn't fix it properly yet.


---
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 issue #63: End the listener if any shard is deleted

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

    https://github.com/apache/couchdb-fabric/pull/63
  
    Hm...does this means that CouchDB will never start chttpd since _users doesn't exists by default and should be created manually after cluster setup?


---
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 issue #63: End the listener if any shard is deleted

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

    https://github.com/apache/couchdb-fabric/pull/63
  
    Good then.


---
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 issue #63: End the listener if any shard is deleted

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

    https://github.com/apache/couchdb-fabric/pull/63
  
    This has the side-effect of crashing chttpd_auth_cache if _users doesn't exist. At startup this means chttpd never starts, so a user can't create it.


---
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 issue #63: End the listener if any shard is deleted

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

    https://github.com/apache/couchdb-fabric/pull/63
  
    I think this patch _is_ right. There's a third bug, namely that chttpd_auth_cache crashes intensely if _users db doesn't exist.


---
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 #63: End the listener if any shard is deleted

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-fabric/pull/63#discussion_r70449862
  
    --- Diff: src/fabric_db_update_listener.erl ---
    @@ -83,7 +83,9 @@ start_update_notifier(DbNames) ->
     handle_db_event(_DbName, updated, #cb_state{notify = true} = St) ->
         erlang:send(St#cb_state.client_pid, {St#cb_state.client_ref, db_updated}),
         {ok, St};
    -handle_db_event(_DbName, _Event, St) ->
    +handle_db_event(_DbName, deleted, St) ->
    +    {stop, St};
    +handle_db_event(DbName, Event, St) ->
    --- End diff --
    
    @rnewson ):


---
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 issue #63: End the listener if any shard is deleted

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

    https://github.com/apache/couchdb-fabric/pull/63
  
    See https://github.com/apache/couchdb-chttpd/pull/132 for the intensity crash fix, which gets us back to the original behavior of logging an error every 5 seconds until _users is created.


---
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 #63: End the listener if any shard is deleted

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

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


---
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 #63: End the listener if any shard is deleted

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-fabric/pull/63#discussion_r70418887
  
    --- Diff: src/fabric_db_update_listener.erl ---
    @@ -83,7 +83,9 @@ start_update_notifier(DbNames) ->
     handle_db_event(_DbName, updated, #cb_state{notify = true} = St) ->
         erlang:send(St#cb_state.client_pid, {St#cb_state.client_ref, db_updated}),
         {ok, St};
    -handle_db_event(_DbName, _Event, St) ->
    +handle_db_event(_DbName, deleted, St) ->
    +    {stop, St};
    +handle_db_event(DbName, Event, St) ->
    --- End diff --
    
    `DbName` and `Event` are unused here, will produce compilation warnings.


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