Improve handling of uploaded attachments that could lead to database to filesystem filesize mismatch

XMLWordPrintable

    • 3
    • Severity 3 - Minor

      Similarly raised in CONFSERVER-23771

      When migrating from Confluence cloud to server/DC, some customers encounter warnings such as:

      [Long running task: Importing data] [persistence.dao.hibernate.AbstractHibernateAttachmentDao$IntraHibernateAttachmentCopier] saveAttachmentData Attachment data size for 'Attachment: {{<file name> (file id) username}}' did not match attachment size. Attachment data stream contains a different number of bytes to the declared size of the attachment. Expected: 1137747, actual: 0
      

      This is caused by a mismatch between the reported filesize in the attachment table and the actual size of the attachment media.

      The behaviour is different for some attachments that are affected by this, e.g

      • Failed to load error on the page - likely a problem while they were attaching it
      • Attachments on page that are not broken ttached to the page with no errors
      • Some attachments in trash with 0 bytes but database says otherwise

      There's currently no pattern to this.

      The good news is that it doesn't stop the migration, however it would be great to improve handling of uploaded attachments in the Cloud that could lead to such mismatch.

              Assignee:
              Unassigned
              Reporter:
              Uchechi I
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: