Reviewed: https://review.openstack.org/114120 Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=f4d3facdf4b6ec8ee0dcacc7be8999731c68a8ec Submitter: Jenkins Branch: master
commit f4d3facdf4b6ec8ee0dcacc7be8999731c68a8ec Author: Matthew Oliver <email address hidden> Date: Thu Aug 14 14:39:18 2014 +1000
Treat 404s as 204 on object delete in proxy
This change adds an optional overrides map to _make_request method in the base Controller class.
def make_requests(self, req, ring, part, method, path, headers, query_string='', overrides=None)
Which will be passed on the the best_response method. If set and no quorum it reached, the override map is used to attempt to find quorum.
The overrides map is in the form:
{ <response>: <override response>, .. }
The ObjectController, in the DELETE method now passes an override map to make_requests method in the base Controller class in the form of:
{ 404: 204 }
Statuses/responses that have been overridden are used in calculation of the quorum but never returned to the user. They are replaced by:
(STATUS, '', '', '')
And left out of the search for best response.
Change-Id: Ibf969eac3a09d67668d5275e808ed626152dd7eb Closes-Bug: 1318375
Reviewed: https:/ /review. openstack. org/114120 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=f4d3facdf4b 6ec8ee0dcacc7be 8999731c68a8ec
Committed: https:/
Submitter: Jenkins
Branch: master
commit f4d3facdf4b6ec8 ee0dcacc7be8999 731c68a8ec
Author: Matthew Oliver <email address hidden>
Date: Thu Aug 14 14:39:18 2014 +1000
Treat 404s as 204 on object delete in proxy
This change adds an optional overrides map to _make_request method
in the base Controller class.
def make_requests(self, req, ring, part, method, path, headers,
query_ string= '', overrides=None)
Which will be passed on the the best_response method. If set and
no quorum it reached, the override map is used to attempt to find
quorum.
The overrides map is in the form:
{ <response>: <override response>, .. }
The ObjectController, in the DELETE method now passes an override map
to make_requests method in the base Controller class in the form of:
{ 404: 204 }
Statuses/ responses that have been overridden are used in calculation
of the quorum but never returned to the user. They are replaced by:
(STATUS, '', '', '')
And left out of the search for best response.
Change-Id: Ibf969eac3a09d6 7668d5275e808ed 626152dd7eb
Closes-Bug: 1318375