swift/test
Alistair Coles dc3eda7e89 proxy: don't send multi-part terminator when no parts sent
If the proxy timed out while reading a replicated policy multi-part
response body, it would transform the ChunkReadTimeout to a
StopIteration. This masks the fact that the backend read has
terminated unexpectedly. The document_iters_to_multipart_byteranges
would complete iterating over parts and send a multipart terminator
line, even though no parts may have been sent.

This patch removes the conversion of ChunkReadTmeout to StopIteration.
The ChunkReadTimeout that is now raised prevents the
document_iters_to_multipart_byteranges 'for' loop completing and
therefore stops the multi-part terminator line being sent. It is
raised from the GetOrHeadHandler similar to other scenarios that raise
ChunkReadTimeouts while the resp body is being read.

A ChunkReadTimeout exception handler is removed in the
_iter_parts_from_response method. This handler was previously never
reached (because StopIteration rather than ChunkReadTimeout was raised
from _get_next_response_part), but if it were reached (i.e. with this
change) then it would repeat logging of the error and repeat
incrementing the node's error counter.

This change in the GetOrHeadHandler mimics a similar change in the
ECFragGetter [1].

[1] Related-Chage: I0654815543be3df059eb2875d9b3669dbd97f5b4
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Change-Id: I6dd53e239f5e7eefcf1c74229a19b1df1c989b4a
2024-02-05 10:28:40 +00:00
..
cors s3api: Allow CORS preflights for pre-signed URLs 2021-07-14 10:52:12 -07:00
functional Include accept-ranges header in s3api response 2023-10-13 16:39:09 +00:00
probe Merge "tests: Get test_handoff_non_durable passing with encryption enabled" 2024-01-18 08:47:36 +00:00
s3api s3api: Add basic GET object-lock support 2023-10-05 16:38:35 +11:00
unit proxy: don't send multi-part terminator when no parts sent 2024-02-05 10:28:40 +00:00
__init__.py Clean up some cruft 2023-01-19 12:56:08 -08:00
debug_logger.py Merge "proxy: Get rid of MetricsPrefixLoggerAdapter" 2023-09-11 05:10:00 +00:00
sample.conf fix s3api functional tests 2020-05-15 22:38:04 -07:00