swift/swift
Tim Burke 2d25fe6ad3 Reduce backend requests for SLO If-Match / HEAD requests
... by storing SLO Etag and size in sysmeta.

Previously, we had to GET the manifest for every HEAD or conditional
request to an SLO. Worse, since SLO PUTs require that we HEAD every
segment, we'd GET all included sub-SLO manifests. This was necessary so
we could recompute the large object's Etag and content-length.

Since we already know both of those during PUT, we'll now store it in
object sysmeta. This allows us to:

 * satisfy HEAD requests based purely off of the manifest's HEAD
   response, and
 * perform the If-(None-)Match comparison on the object server, without
   any additional subrequests.

Note that the large object content-length can't just be parsed from
content-type -- with fast-POST enabled, the content-type coming out of
the object-server won't necessarily include swift_bytes.

Also note that we must still fall back to GETting the manifest if the
sysmeta headers were not found. Otherwise, we'd break existing large
objects.

Change-Id: Ia6ad32354105515560b005cea750aa64a88c96f9
2016-11-21 14:39:50 -08:00
..
account Merge "py3: Fixes encoding and type error" 2016-09-05 13:18:24 +00:00
cli Respect server type for --md5 check in swift-recon 2016-10-31 07:26:22 +00:00
common Reduce backend requests for SLO If-Match / HEAD requests 2016-11-21 14:39:50 -08:00
container Correct swift reraising of exception 2016-09-01 02:25:29 +00:00
locale Imported Translations from Zanata 2016-07-19 08:27:04 +00:00
obj Merge "Remove duplicated 'User-Agent' header from object-updater's requests" 2016-11-16 21:50:21 +00:00
proxy Add X-Openstack-Request-Id to Access-Control-Expose-Headers 2016-11-16 12:39:12 -08:00
__init__.py Make pbr a build-time only dependency 2013-10-29 12:29:49 -07:00