swift/test/unit/proxy
Alistair Coles d0f6a0ce56 Ignore 404s from handoffs when choosing response code
Previously, when handling an object POST, if the proxy got a 202 and
two connection timeouts from the 3 primary backend object servers, it
then went to two handoffs which return 404. The proxy would consider
this to be a quorum of 404s and return the client a 404 response. This
is alarming for the client.

With this patch, the proxy will only treat a 404 response from a
handoff as authoritative if it has an x-backend-timestamp header
(i.e. there's a tombstone on the handoff).  POST responses never have
an x-backend-timestamp header so in the scenario described above the
proxy will return a 503.

The Related-Change previously made a similar fix such that 404s from
handoffs are already non-authoritative for object GETs and HEADs
unless they have an x-backend-timestamp header.

Related-Change: Ia832e9bab13167948f01bc50aa8a61974ce189fb
Cloeses-Bug: #2077743
Change-Id: I96f28ab0b2b5f9374c399e8905ee240e7b093f8b
2024-08-23 16:14:34 +01:00
..
controllers Ignore 404s from handoffs when choosing response code 2024-08-23 16:14:34 +01:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test_mem_server.py Fix socket leak on object-server death 2019-01-31 18:38:35 +00:00
test_server.py Pass db_state to container-update and async_pending 2024-07-12 20:46:14 -05:00
test_sysmeta.py Cleanup tests' import of debug_logger 2021-04-27 12:04:41 +01:00