couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Kocoloski (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1901) Replicator needs to retry multipart requests atomically
Date Wed, 02 Oct 2013 18:03:42 GMT


Adam Kocoloski commented on COUCHDB-1901:

I pushed a pull request at which includes the work
from the aforementioned Cloudant PR as well as some earlier fixes by [~paul.joseph.davis]
regarding connection handling in the multipart workflow.

> Replicator needs to retry multipart requests atomically
> -------------------------------------------------------
>                 Key: COUCHDB-1901
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>            Reporter: Adam Kocoloski
>            Assignee: Adam Kocoloski
>             Fix For: 1.5.0
> couch_replicator_httpc's retry mechanism interacts poorly with the multipart requests
we use to transfer attachments during replication.  In the case of PUTs, the replicator will
retry a request even though it has already streamed part of the request body.  For GETs, it
can potentially interleave body data from the original response and the retried one.
> I put together a fix at that disables
the default httpc client retry mechanism for multipart requests and manages the retry logic
"atomically"; i.e., it retries the original GET request if the GET or PUT fails, and it ensures
that the original GET request is properly terminated during the retry.  I'll push a version
of that patch to the Apache repo now.

This message was sent by Atlassian JIRA

View raw message