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

Cannot delete document with many large attachments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0-milestone-1
    • Fix Version/s: 9.0-rc-1
    • Component/s: Old Core, Storage
    • Labels:
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      The problem is that com.xpn.xwiki.store.XWikiHibernateStore.deleteXWikiDoc(XWikiDocument, XWikiContext) calls com.xpn.xwiki.store.XWikiHibernateAttachmentStore.deleteXWikiAttachment(XWikiAttachment, boolean, XWikiContext, boolean) in the same session, and this one wrongly calls loadAttachmentContent. So it tries to load all the attachments in memory in the current session, just to delete them. But to delete something from the session it's enough to have a "stub" with the same identifier, the actual content isn't needed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                sdumitriu Sergiu Dumitriu
              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: