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

Cannot delete document with many large attachments

    XMLWordPrintable

Details

    • Unknown

    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

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

              Dates

                Created:
                Updated:
                Resolved: