Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-35300

Attachments with minor edit set to true are not accounted for in the change index

    XMLWordPrintable

Details

    Description

      Confluence logs an error when reindexing attachments with minor edit set to true.

      • In some cases the index will not complete, despite the indexes being rebuilt from scratch.
      • Restrictions do not make a difference.
      • Minor Edit is set to true in the contentproperties table when an attachment is added using drag-and-drop.

      Here is the error:

      2015-11-23 20:14:16,197 ERROR [Indexer: 3] [confluence.search.lucene.ReindexWorkBatch] indexCollection Exception indexing document with id: 15434444
       -- referer: https://secure.compandsave.com/confluence/admin/search-indexes.action | url: /confluence/admin/reindex.action | userName: xxxx | action: reindex
      java.lang.IllegalArgumentException: searchable: Attachment: New Hire - i-9.pdf v.1 (16023917) michaelc is not supported: Attachments with minor edit set to true are not accounted for in the change index
      	at com.atlassian.confluence.search.lucene.tasks.AddChangeDocumentIndexTask.<init>(AddChangeDocumentIndexTask.java:47)
      	at com.atlassian.confluence.search.lucene.tasks.IndexTaskFactory.createAddChangeDocumentTask(IndexTaskFactory.java:133)
      	at com.atlassian.confluence.search.lucene.tasks.RebuildChangeDocumentsIndexTask.perform(RebuildChangeDocumentsIndexTask.java:78)
      	at com.atlassian.confluence.search.lucene.ReindexWorkBatch.indexCollection(ReindexWorkBatch.java:146)
      	at com.atlassian.confluence.search.lucene.ReindexWorkBatch.lambda$executeTransaction$417(ReindexWorkBatch.java:109)
      	at com.atlassian.confluence.search.lucene.ReindexWorkBatch$$Lambda$187/1248108333.doInTransaction(Unknown Source)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
      	at com.atlassian.confluence.search.lucene.ReindexWorkBatch.executeTransaction(ReindexWorkBatch.java:84)
      	at com.atlassian.confluence.search.lucene.ReindexWorkBatch.run(ReindexWorkBatch.java:72)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:164)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      As a workaround, minor edit may be set to false in the database with a query such as the following which was tested on PostgreSQL:

      update contentproperties set longval = '0' 
      where propertyname = 'MINOR_EDIT' and contentid = (select contentid from content where contenttype = 'ATTACHMENT' and title = '_attachment name from error message_')

      Attachments

        Issue Links

          Activity

            People

              dunterwurzacher Denise Unterwurzacher [Atlassian] (Inactive)
              7ab265d9ed24 roomeon
              Votes:
              29 Vote for this issue
              Watchers:
              42 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: