swift/test/unit
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 "More Test[Account|Container]Controller test updates" 2016-09-13 01:48:59 +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 Simplify container_updater test code 2016-10-12 13:14:39 +08: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
test_locale monkeypatch thread for keystoneclient 2015-11-03 16:36:19 +01:00
__init__.py Fix ZeroDivisionError in reconstructor.stats_line 2016-11-07 18:19:20 -08:00
helpers.py Refactor tests and add tests 2016-06-15 16:36:25 +01:00