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

[GitHub] couchdb-documentation pull request: Removing _rev

GitHub user timmillwood opened a pull request:

    https://github.com/apache/couchdb-documentation/pull/43

    Removing _rev

    Let's assume the recording of a replication checkpoint is the first time this replication has taken place, and therefore no `_rev` is needed, and the response will always be `"rev": "0-1"`.
    
    I have also removed the content-length header, and the _revisions element, because these seem to add more confusion than explanation.

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

    $ git pull https://github.com/timmillwood/couchdb-documentation patch-1

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

    https://github.com/apache/couchdb-documentation/pull/43.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 #43
    
----
commit 3df287da8e7602527571076ae338590f1a2dee1f
Author: Tim Millwood <ti...@millwoodonline.co.uk>
Date:   2016-03-16T11:41:05Z

    Removing _rev
    
    Let's assume the recording of a replication checkpoint is the first time this replication has taken place, and therefore no `_rev` is needed, and the response will always be `"rev": "0-1"`.
    
    I have also removed the content-length header, and the _revisions element, because these seem to add more confusion than explanation.

----


---
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-documentation pull request: Removing _rev

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

    https://github.com/apache/couchdb-documentation/pull/43#discussion_r56322428
  
    --- Diff: src/replication/protocol.rst ---
    @@ -1585,20 +1585,12 @@ Replicator updates Replication Log on Source:
     
             PUT /source/_local/afa899a9e59589c3d4ce5668e3218aef HTTP/1.1
             Accept: application/json
    -        Content-Length: 591
    --- End diff --
    
    I would prefer to explicitly show that this is not a chunked transfer. Removing content length will cause a questions.


---
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-documentation pull request: Removing _rev

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

    https://github.com/apache/couchdb-documentation/pull/43#discussion_r56322481
  
    --- Diff: src/replication/protocol.rst ---
    @@ -1585,20 +1585,12 @@ Replicator updates Replication Log on Source:
     
             PUT /source/_local/afa899a9e59589c3d4ce5668e3218aef HTTP/1.1
             Accept: application/json
    -        Content-Length: 591
             Content-Type: application/json
             Host: localhost:5984
             User-Agent: CouchDB
     
             {
                 "_id": "_local/afa899a9e59589c3d4ce5668e3218aef",
    -            "_rev": "0-1",
    -            "_revisions": {
    --- End diff --
    
    Actually, `_revisions` does send to remote here. No reason to hide that.


---
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-documentation issue #43: Removing _rev

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

    https://github.com/apache/couchdb-documentation/pull/43
  
    @timmillwood any interest in reviving this PR? If not we should close it out.


---
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-documentation pull request: Removing _rev

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

    https://github.com/apache/couchdb-documentation/pull/43#discussion_r56322855
  
    --- Diff: src/replication/protocol.rst ---
    @@ -1644,20 +1636,12 @@ Replicator updates Replication Log on Source:
     
             PUT /target/_local/afa899a9e59589c3d4ce5668e3218aef HTTP/1.1
             Accept: application/json
    -        Content-Length: 591
             Content-Type: application/json
             Host: localhost:5984
             User-Agent: CouchDB
     
             {
                 "_id": "_local/afa899a9e59589c3d4ce5668e3218aef",
    -            "_rev": "1-31f36e40158e717fbe9842e227b389df",
    --- End diff --
    
    I would prefer to show here the case when Source and Target are out of sync of checkpoint document revisions. That's fine and could be, but doesn't really matters as like as the local document revisions. CouchDB uses `0-N`, some else compatible service may provide own ones. That's not a strict rule to follow.


---
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-documentation pull request: Removing _rev

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

    https://github.com/apache/couchdb-documentation/pull/43#issuecomment-197292548
  
    @kxepal Thanks for reviewing, I'll working a more thorough update and explain some of the nuances, and if source and target are out of date.
    
    Maybe I don't understand `_revisions` but I've not seen a need to send 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-documentation pull request: Removing _rev

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

    https://github.com/apache/couchdb-documentation/pull/43#issuecomment-197316453
  
    @timmillwood It actually does, you can check that via wireshark dump. As for the code part, `_revisions` are get injected [here](https://github.com/apache/couchdb-couch-replicator/blob/master/src/couch_replicator_api_wrap.erl#L363-L365) by `revs` option.


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