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/06 21:29:35 UTC

[GitHub] couchdb-mem3 pull request: Make sure mem3_rep autocreates target s...

GitHub user iilyak opened a pull request:

    https://github.com/apache/couchdb-mem3/pull/21

    Make sure mem3_rep autocreates target shards

    The change to our fancier history entries introduced a regression that
    internal replication wouldn't automatically create the target shards.
    This fixes the issue by adding a get_or_create_db/2 in mem3_rep and
    switches the use of couch_db:open_int/2 to that function.
    
    Conflicts:
    	src/mem3_rpc.erl

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

    $ git pull https://github.com/cloudant/couchdb-mem3 43260-create-target-shard-if-missing

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

    https://github.com/apache/couchdb-mem3/pull/21.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 #21
    
----
commit 8c97c7646f740c5a179fff2da779b597f3ae3fb8
Author: Paul J. Davis <pa...@gmail.com>
Date:   2015-01-08T19:08:03Z

    Make sure mem3_rep autocreates target shards
    
    The change to our fancier history entries introduced a regression that
    internal replication wouldn't automatically create the target shards.
    This fixes the issue by adding a get_or_create_db/2 in mem3_rep and
    switches the use of couch_db:open_int/2 to that function.
    
    Conflicts:
    	src/mem3_rpc.erl

----


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#issuecomment-219889720
  
    Should I rollback cherry-pick and implement it as fresh commit to be polite?


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#issuecomment-218286245
  
    +1 
    
    Verified by deleting a shard of a db on node1 00000000-1fffffff/rdyno_src_0001.1462912443.couch.
    Then restarted cluster. And saw in node1's log this line:
    
    `node1.log:2016-05-10 16:44:50.424 [warning] node1@127.0.0.1 <0.1897.0> fabric_rpc creating shards/00000000-1fffffff/rdyno_src_0001.1462912443`
    
    And shard was re-created successfully.


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#discussion_r62396609
  
    --- Diff: src/mem3_rpc.erl ---
    @@ -275,6 +275,16 @@ rexi_call(Node, MFA) ->
         end.
     
     
    +get_or_create_db(DbName, Options) ->
    +    case couch_db:open_int(DbName, Options) of
    +    {not_found, no_db_file} ->
    +        twig:log(warn, "~p creating ~s", [?MODULE, DbName]),
    --- End diff --
    
    Don't we need couch_log here?


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#discussion_r63403783
  
    --- Diff: src/mem3_rpc.erl ---
    @@ -275,6 +275,16 @@ rexi_call(Node, MFA) ->
         end.
     
     
    +get_or_create_db(DbName, Options) ->
    --- End diff --
    
    since this is a cut-and-paste of a live function in fabric, can we put some thought to keeping this DRY?


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#discussion_r62547512
  
    --- Diff: src/mem3_rpc.erl ---
    @@ -275,6 +275,16 @@ rexi_call(Node, MFA) ->
         end.
     
     
    +get_or_create_db(DbName, Options) ->
    +    case couch_db:open_int(DbName, Options) of
    +    {not_found, no_db_file} ->
    +        twig:log(warn, "~p creating ~s", [?MODULE, DbName]),
    --- End diff --
    
    good catch


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#issuecomment-219966101
  
    +1 but please remove the 'conflicts: mem3_rpc.erl' part of the commit before merging.


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#issuecomment-217986323
  
    @nickva: Commit is amended to use couch_log. 


---
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-mem3 pull request: Make sure mem3_rep autocreates target s...

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

    https://github.com/apache/couchdb-mem3/pull/21#issuecomment-219889427
  
    New option `create_if_missing` is added to couch_db:open.
    PRs:
    - https://github.com/apache/couchdb-couch/pull/174
    - https://github.com/apache/couchdb-fabric/pull/50


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