Return-Path: X-Original-To: apmail-libcloud-commits-archive@www.apache.org Delivered-To: apmail-libcloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DAF410CCB for ; Mon, 6 Jan 2014 14:28:07 +0000 (UTC) Received: (qmail 50720 invoked by uid 500); 6 Jan 2014 14:27:57 -0000 Delivered-To: apmail-libcloud-commits-archive@libcloud.apache.org Received: (qmail 50704 invoked by uid 500); 6 Jan 2014 14:27:53 -0000 Mailing-List: contact commits-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list commits@libcloud.apache.org Received: (qmail 50687 invoked by uid 99); 6 Jan 2014 14:27:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jan 2014 14:27:51 +0000 Date: Mon, 6 Jan 2014 14:27:51 +0000 (UTC) From: "Tomaz Muraus (JIRA)" To: commits@libcloud.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LIBCLOUD-490) Zero-byte uploads to S3 fail 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/LIBCLOUD-490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13863010#comment-13863010 ] Tomaz Muraus commented on LIBCLOUD-490: --------------------------------------- [~coderanger] I've pushed an initial fix for this issue. With my fix, multipart uploads now also work correctly for empty (0 bytes sized) objects. This fix / approach is not ideal because it still uses multipart upload which induces an overhead of 2 HTTP requests. I will work with [~mahendra.m] on improving the code and making sure it uses a regular upload for objects smaller than <= MIN_CHUNK_SIZE. > Zero-byte uploads to S3 fail > ---------------------------- > > Key: LIBCLOUD-490 > URL: https://issues.apache.org/jira/browse/LIBCLOUD-490 > Project: Libcloud > Issue Type: Bug > Components: Storage > Affects Versions: 0.13.3 > Reporter: Noah Kantrowitz > > Calling storage.upload_object_via_stream(iter(('',)), path) fails with: > {{libcloud.common.types.LibcloudError: 'Error in multipart commit'>}} > A workaround is temporarily monkeypatch {{S3StorageDriver.supports_s3_multipart_upload = False}}. It would be nice if I could just call put_object directly in some useful way, for data that is small enough to fit in RAM (which in the case of an empty file is a bit of a tautology). -- This message was sent by Atlassian JIRA (v6.1.5#6160)