Closed justinlin-linkedin closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.09%. Comparing base (
52ba813
) to head (fdc7950
). Report is 78 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
When client closes the connection while downloading a blob, we will set the error response status to InternalServerError and then increment a GetBlobServerError counter in ContainerMetrics. But this is not a server error, this is a client.
This PR fixes this discrepancy. We will set error response status to client error so later it won't be counted as server error.
Operations
This would likely to impact two operations, GetBlobOperation and PutOperation. For GetBlobOperations, it should be fine, since the client already closes the connection, and we already send back 200 or 206 before, so it won't affect the status code of this response. This is just for internal metric tracking. For PutOperations, it should be fine too, since client closing connection without sending all the byte should be considered as bad request, instead of 503. This will reduce the number of 503 in public access log.
Test
Unit test