Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28FDB100C0 for ; Wed, 2 Oct 2013 21:01:51 +0000 (UTC) Received: (qmail 11508 invoked by uid 500); 2 Oct 2013 21:01:47 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11344 invoked by uid 500); 2 Oct 2013 21:01:45 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 11158 invoked by uid 99); 2 Oct 2013 21:01:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2013 21:01:43 +0000 Date: Wed, 2 Oct 2013 21:01:43 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-1901) Replicator needs to retry multipart requests atomically MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784423#comment-13784423 ] ASF subversion and git services commented on COUCHDB-1901: ---------------------------------------------------------- Commit df0423b5d5c35170626cfc0c10216d2e72e3a83e in branch refs/heads/1901-atomic-multipart-retries from [~kocolosk] [ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=df0423b ] Bubble up missing_stub exceptions for proper retry A missing_stub exception is special in that the replicator retries the request without the atts_since optimmization. COUCHDB-1901 > Replicator needs to retry multipart requests atomically > ------------------------------------------------------- > > Key: COUCHDB-1901 > URL: https://issues.apache.org/jira/browse/COUCHDB-1901 > 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 https://github.com/cloudant/couch_replicator/pull/36 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 (v6.1#6144)