Container object listing shows wrong size for manifest files (large object support)

Bug #874119 reported by Juan J. Martínez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Won't Fix
Undecided
Unassigned

Bug Description

The object listing in a container shows file size 0 for a manifest file (large object support: http://swift.openstack.org/overview_large_objects.html).

Example:

curl -k -H "X-Auth-Token: AUTH_tkc75cc6d14b364be2a5a1fb0a63ce795e" https://swift-proxy/v1/AUTH_7aa910fbd9c146ebbfbf8fa14665f343/miniserver-snapshots/?format=json | tr ',' '\n'
[{"name":"af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.part/1"
"hash":"7fc06487df4b25feb6ff831529b58a5f"
"bytes":1073741824
"content_type":"application/octet-stream"
 "last_modified":"2011-10-14T10:28:53.040560"}
{"name":"af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.part/2"
"hash":"1c7c1d7b97a411eb53efbbf61a5f3fe2"
"bytes":1073741824
"content_type":"application/octet-stream"
 "last_modified":"2011-10-14T10:32:03.069810"}
{"name":"af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.part/3"
"hash":"a0143efeb39d82806dbffd790312824e"
"bytes":1073741824
"content_type":"application/octet-stream"
 "last_modified":"2011-10-14T10:35:54.516930"}
{"name":"af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.part/4"
"hash":"e1e8e4082e225a2af80f54740a299de5"
"bytes":630096023
"content_type":"application/octet-stream"
 "last_modified":"2011-10-14T10:40:30.890310"}
{"name":"af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.raw.gz"
"hash":"d41d8cd98f00b204e9800998ecf8427e"
"bytes":0
"content_type":"x-application/x-gzip"
 "last_modified":"2011-10-14T10:48:12.588660"}]

The manifest file (af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.raw.gz) shows 0 bytes in the listing, but the GET/HEAD requests report the right size (the sum of all 4 parts in this example):

curl -I -k -H "X-Auth-Token: AUTH_tkc75cc6d14b364be2a5a1fb0a63ce795e" https://swift-proxy/v1/AUTH_7aa910fbd9c146ebbfbf8fa14665f343/miniserver-snapshots/af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.raw.gz
HTTP/1.1 200 OK
X-Object-Manifest: miniserver-snapshots/af44a405582f4ad4802db815684d492a.2011-10-14-10-28-53.part
Content-Type: x-application/x-gzip
Content-Length: 3851321495
Last-Modified: Fri, 14 Oct 2011 10:40:30 GMT
Etag: "eafa4a9622e181933435f4abbcfc548c"
Accept-Ranges: bytes
Date: Fri, 14 Oct 2011 11:55:28 GMT

It doesn't matter if the output it's in JSON or XML format, the size is always 0.

This is swift 1.4.3.

Revision history for this message
gholt (gholt) wrote :

Obtaining the size of a segmented object can be an expensive operation (GET/HEAD on the manifest).

Obtaining the size of up to 10,000 segmented objects can be very expensive (container listing).

That's why it's implemented the way it is currently.

Changed in swift:
status: New → Won't Fix
Revision history for this message
Juan J. Martínez (jjmartinez) wrote :

Current implementation is broken. There's no way we know it's a manifest file, and it's showing the wrong file size (0).

Can we think of a workaround?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.