ranged GETs always perform two backend GETs

Bug #1065869 reported by Mike Barton
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Samuel Merritt

Bug Description

Any GET with a Range always sends two GETs to the backend object server - one with the range and one without. This is due to some manifest handling code in the proxy's ObjectController.GETorHEAD. Hopefully it does not need to be so wasteful.

Revision history for this message
Darrell Bishop (darrellb) wrote :

See also https://bugs.launchpad.net/swift/+bug/1066205 for another issue these double-GETs cause.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/14497

Changed in swift:
assignee: nobody → Constantine Peresypkin (constantine-q)
status: New → In Progress
Revision history for this message
Constantine Peresypkin (constantine-q) wrote :

I think this could be fixed by rewriting the second GET as HEAD.
Only response headers are accessed in manifest handling code.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/14803

Changed in swift:
assignee: Constantine Peresypkin (constantine-q) → Samuel Merritt (torgomatic)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/14803
Committed: http://github.com/openstack/swift/commit/9cb7751fad92bc237b62710b6f4926db69cb05bd
Submitter: Jenkins
Branch: master

commit 9cb7751fad92bc237b62710b6f4926db69cb05bd
Author: Samuel Merritt <email address hidden>
Date: Wed Oct 24 17:16:11 2012 -0700

    Remove double GET on range requests.

    The proxy server's ObjectController was performing multiple GET
    requests to the object server when processing requests with Range
    headers. This was a workaround for a bug in the proxy server's
    Controller.GETorHEAD_base method where a response code of 416 from the
    object server was incorrectly treated as a bad response from the
    backend, the same way a 404 or a 5xx would be.

    A 416 (Requested Range Not Satisfiable) from the object server is now
    considered a good response. Since the response headers from the object
    server already include the X-Object-Manifest header, there's no need
    to make a second request (sans Range header) to see if the object is a
    manifest.

    Bonus fix: updated message for status 416 to match RFC2616.

    Bonus fix 2: removed a leftover debugging print() in
    test/unit/proxy/test_server.py.

    Fixes bug 1065869.

    Change-Id: I156af0b463f02ef19a8cfe37092544a599d89b78

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.7.5
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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