You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by kocolosk <gi...@git.apache.org> on 2013/10/02 19:50:40 UTC

couchdb pull request: Retry multipart requests atomically and cleanup prope...

GitHub user kocolosk opened a pull request:

    https://github.com/apache/couchdb/pull/95

    Retry multipart requests atomically and cleanup properly

    This set of patches contains a number of fixes for the replicator's processing of multipart responses. Most of the fixes surround cleaning up connections used for failed requests and ensuring that entire GET+PUT operation is retried atomically (as the replicator pipes the response of the GET directly into the body of the PUT). It also includes a much older patch to use the `latest=true` query string parameter when requesting document revisions, which was a bit of optimization from the CouchDB 1.0 replicator that never made it into the rewrite.
    
    Closes COUCHDB-1901

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

    $ git pull https://github.com/apache/couchdb 1901-atomic-multipart-retries

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

    https://github.com/apache/couchdb/pull/95.patch

----

----


Re: couchdb pull request: Retry multipart requests atomically and cleanup prope...

Posted by Adam Kocoloski <ko...@apache.org>.
I'm fairly happy with the state of this branch, but I realize it's a last-second thing so wanted to solicit some feedback.

The PR description and commit messages contain most of the details.  The gist is that the replicator needs to treat streaming multipart requests+responses specially when it comes to retry logic.  The symptom of the bug that I've observed is that the replicator can "stall out" when trying to replicate a DB with lots of attachments.  It doesn't flat-out crash, it just stops making progress.  With this branch the logging is a bit more verbose (two lines instead of one for each failed multipart GET request, possibly more verbosity for failed PUTs), but hopefully that's OK.

The test suite passes locally -- does anyone want to give it a review before I merge?

Adam

On Oct 2, 2013, at 1:50 PM, kocolosk <gi...@git.apache.org> wrote:

> GitHub user kocolosk opened a pull request:
> 
>    https://github.com/apache/couchdb/pull/95
> 
>    Retry multipart requests atomically and cleanup properly
> 
>    This set of patches contains a number of fixes for the replicator's processing of multipart responses. Most of the fixes surround cleaning up connections used for failed requests and ensuring that entire GET+PUT operation is retried atomically (as the replicator pipes the response of the GET directly into the body of the PUT). It also includes a much older patch to use the `latest=true` query string parameter when requesting document revisions, which was a bit of optimization from the CouchDB 1.0 replicator that never made it into the rewrite.
> 
>    Closes COUCHDB-1901
> 
> You can merge this pull request into a Git repository by running:
> 
>    $ git pull https://github.com/apache/couchdb 1901-atomic-multipart-retries
> 
> Alternatively you can review and apply these changes as the patch at:
> 
>    https://github.com/apache/couchdb/pull/95.patch
> 
> ----
> 
> ----
>