Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17457

Filesystem attachments versioning ends up storing 2 copies of the latest version

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 12.5-rc-1
    • Fix Version/s: None
    • Component/s: Attachments
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      As you can clearly see from the image below, with attachment versioning enabled on filesystem attachments storage, we end up with 2 files instead of 1, for the latest version of the attachment:

      • f.png <-- latest uploaded file contents (takes up 500 K)
      • fv1.3.png <-- latest versioned content of the uploaded file (takes up 500 K again)

      This does not really bring any value and, with large files even in low numbers, we can end up wasting considerable amounts of storage on the server running the XWiki instance.

      Instead of storing the attachment twice, we should always fetch the latest version (i.e. remove the need for f.png in the example above) and return fv1.3.png for both requests of the latest version and of the explicit 1.3 version.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              enygma Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: