1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #4274 closed

Reuploading file does not update the file (BB-4773)

Andrés Arana
created an issue

=== Synopsis ===

When you have an existent uploaded file which has already been downloaded at least once and you upload it again with updated content, the file itself does not get updated.

The file metadata which is included in the downloads page is updated (for example, the new file size is shown). But downloading the file results in the previous file being served from the cloudfront CDN.

=== Additional information ===

We have confirmed this behaviour on various pc's, and we have ruled out local caching by uploading and downloading the file from different computers.

We noticed you are using amazon cloudfront to host the actual files uploaded to the project. All the machines we tested on are located in Buenos Aires, Argentina, South America. I don't know if this has anything to do with cdn replication of the original file.

=== Steps to reproduce ===

Create a text file containing a line "First"

Upload the text file to a public repository by going to the downloads page of the repository (for example, https://bitbucket.org/braintag/carbonlibrestapis/downloads)

Download the file by clicking on the file name on the page

Edit the original text file and add a line "Second"

Upload the text file again to the same repository

Download the file by clicking on the file name on the page again. You will obtain the original file without the "Second" line.

Comments (5)

  1. Marcus Bertrand [Atlassian] staff
    • changed status to open

    This is indeed an issue with our CDN. We don't have a short term solution to this, but replacing the same file should invalidate the old one eventually. As an alternative, you may want to consider applying a version number to the end of your file names to get around this for now.

  2. Marcus Bertrand [Atlassian] staff

    For more information about why we say eventually, read the Amazon S3 FAQ under data consistency. For most operations, there is "eventual" consistency.

    Q: What data consistency model does Amazon S3 employ?

    Amazon S3 buckets in the US Standard region provide eventual consistency. Amazon S3 buckets in all other regions >provide read-after-write consistency for PUTS of new objects and eventual consistency for overwrite PUTS and DELETES.

  3. Log in to comment