Bug #17204

[keep-web] Avoid red-herring error log on 304 Not Modified responses

Added by Tom Clegg 12 months ago. Updated 12 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Keep
Start date:
04/21/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

While handling a conditional request that results in a 304 Not Modified response, keep-web logs this error:

"stat.Size()==3299929 but only wrote 0 bytes; read(1024) returns 1024, %!s(<nil>)" 
We should
  1. use %v instead of %s so a nil error is just "nil" instead of "%!s(<nil>)"
  2. not log this error if the response code is 304

Subtasks

Task #17553: Review 17204-not-modifiedResolvedTom Clegg

Associated revisions

Revision 7141824b
Added by Tom Clegg 7 months ago

Merge branch '17204-not-modified'

fixes #17204

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

History

#1 Updated by Tom Clegg 12 months ago

  • Description updated (diff)

#2 Updated by Tom Clegg 8 months ago

  • Target version set to 2021-04-28 bughunt sprint
  • Assigned To set to Tom Clegg

#3 Updated by Tom Clegg 7 months ago

  • Status changed from New to In Progress

17204-not-modified @ 17a35d4e667e2c38b5c00c174bd9a76e784ebaef -- https://ci.arvados.org/view/Developer/job/developer-run-tests/2434/

The test covers the 304 case, but the fix covers other non-200 response codes as well, like 412 precondition failed and 207 partial content.

Also fixed an unclosed-file bug, even though (so far) it was harmless because Close() is a no-op in a collectionfs.

#5 Updated by Tom Clegg 7 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

#6 Updated by Peter Amstutz 12 days ago

  • Release set to 41

Also available in: Atom PDF