swift/swift/common
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
..
middleware Reduce backend requests for SLO If-Match / HEAD requests 2016-11-21 14:39:50 -08:00
ring Avoid infinite loop while placing parts 2016-11-17 15:32:47 -08:00
__init__.py Start using Hacking 2013-07-15 11:41:58 +02:00
base_storage_server.py Add server type in OPTIONS response 2015-01-30 00:25:28 +05:30
bufferedhttp.py Python3 eventlet patched httplib _MAXHEADERS 2016-07-21 04:21:36 +00:00
constraints.py Fix typo in docstring 2016-09-27 16:13:05 +07:00
container_sync_realms.py Use ConfigParser instead of SafeConfigParser 2016-09-12 15:02:40 +07:00
daemon.py Fix signal handling for daemons with InternalClient 2016-11-04 20:00:00 -07:00
db.py Merge "swift-[account|container]-info when disk is full" 2016-04-22 17:31:09 +00:00
db_replicator.py Simplify chained comparison 2016-07-15 19:11:47 +00:00
direct_client.py Add end_marker and reverse options to direct_client 2016-07-29 09:24:05 +10:00
exceptions.py Fix EC ring validation at ring reload 2016-07-24 21:49:57 -07:00
header_key_dict.py Py3: Fixes header key dict 2016-11-08 12:22:12 -08:00
http.py Fix pep8 E265 warning of hacking 0.10 2015-07-30 09:33:18 +02:00
internal_client.py Py3: Fixes eventlet ImportError: No module named urllib2 2016-09-07 09:04:30 +00:00
linkat.py Make object creation more atomic in Linux 2016-08-24 14:56:00 +05:30
manager.py fix string formatting in manager 2016-09-13 15:15:13 -07:00
memcached.py Tighten memcached tests 2016-07-07 15:34:44 -04:00
request_helpers.py Support multi-range GETs for static large objects. 2016-08-18 15:56:06 -07:00
splice.py Replace reduce and unichr , these are no longer available in py3 2015-07-09 21:56:29 +05:30
storage_policy.py Fix EC ring validation at ring reload 2016-07-24 21:49:57 -07:00
swob.py Ignore Range values like "bytes=--0" 2016-10-29 18:33:48 +02:00
utils.py Merge "Make NullLogger more logger like" 2016-11-03 02:07:48 +00:00
wsgi.py Merge "monkey_patch_mimetools() now does nothing on py3" 2016-08-18 10:53:48 +00:00