mime type changes to attachments do not take effect immediately

RESOLVED FIXED

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: longsonr, Unassigned)

Tracking

Production

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Create an attachment in bugzilla and give it a mime type of text/plain
Change the mime type e.g. to text/html or image/svg+xml

The attachment is still served as text/plain for some minutes. Eventually it does change to the correct mime type.

Seems to be a fairly recent regression.
this looks like a replication lag issue, moving to bmo.
Assignee: attach-and-request → nobody
Component: Attachments & Requests → General
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa
Version: unspecified → Production
i'm unable to reproduce this issue in dev or production.

robert, was this just a single occurrence on bug 1188549, or has this happened multiple times?
Flags: needinfo?(longsonr)
(Reporter)

Comment 3

3 years ago
also happened on bug 1183665.
Flags: needinfo?(longsonr)
(Reporter)

Comment 4

3 years ago
and happening right now on bug 661470
hrm, i can't reproduce the issue there (you can see my prior attempt).

where are you seeing the invalid value .. in the attachments table on show_bug, or somewhere else?
can you try it in a different browser?
Flags: needinfo?(longsonr)
(Reporter)

Comment 6

3 years ago
The value is valid, when I try to view the attachment (click on details link on the attachment) then the document is served with the old mime-type and appears as source (text/plain) or still appears as a png (when changed from image/png to something text/plain in bug 661470 for instance)

Same thing happens in Chrome.
Flags: needinfo?(longsonr)
(Reporter)

Comment 7

3 years ago
Created attachment 8640567 [details]
Screen Shot 2015-07-29 at 17.49.25.png
ok, so you're saying that the content-type is wrong when viewing the attachment itself, but correct on show_bug.

i can reproduce this only if i update the attachment and then immediately try to view it.  if i wait a few seconds then the correct content-type is served when viewing the attachment (ie. if i wait for db replication to complete).

when you said "for some minutes" in comment 0, do you actually mean "at least 60 seconds", or just that it doesn't happen immediately?
Flags: needinfo?(longsonr)
(Reporter)

Comment 9

3 years ago
Testing via bug bug 661470 suggests it takes around 10 minutes to sync up for me (9 minutes still wrong > 10 minutes ok again).
Flags: needinfo?(longsonr)
it looks like caching was erroneously enabled on our load balancer for the attachments domain.  i can't explain why i've been unable to reproduce the issue, but it's highly likely this was causing the problem you're describing.

can you please test it again?
Flags: needinfo?(longsonr)
(Reporter)

Comment 11

3 years ago
It's fixed now. Thanks Byron.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Flags: needinfo?(longsonr)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.