Confluence index size calculation not working for manual reindex from scratch after split index upgrade task

XMLWordPrintable

    • 12
    • Severity 3 - Minor
    • 2

      Problem

      The logic to calculate the index size for one of the analytics events (finished_indexing) is not working since the index was split into content and change segments.

      Environment

      Confluence cluster with two or more nodes on version 7.9+ (tested with 7.13)

      Steps to Reproduce

      1. Stop Confluence on all nodes
      2. Add the following system property as you would do for a manual rebuild from scratch:
        confluence.cluster.index.recovery.num.attempts=0
        
      1. Do not delete the index folder, just start the nodes
      2. Go to General Configuration > Content Indexing and click Rebuild

      Expected Results

      Index rebuild and propagation finishes without errors or warning messages. An analytics event (finished_indexing) is captured which contains index type and size.

      Actual Results

      Index rebuild and propagation completes, but the analytics event cannot be captured and the following warning is seen in the atlassian-confluence-index.log:

      2021-09-27 20:59:15,518 WARN [lucene-interactive-reindexing-thread] [internal.index.lucene.LuceneIndexHelper] sizeOfIndexMB Cannot determine size of index located at change
       -- referer: http://10.125.90.153:8090/plugins/servlet/rebuildindex | url: /rest/prototype/latest/index/reindex | traceId: 5ad7ec4c52bda48a | userName: admin
      java.nio.file.NoSuchFileException: change
      	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
      	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
      	at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:432)
      	at java.base/java.nio.file.Files.newDirectoryStream(Files.java:472)
      	at java.base/java.nio.file.Files.list(Files.java:3699)
      	at com.atlassian.confluence.internal.index.lucene.LuceneIndexHelper.listRegularFilesNonRecursive(LuceneIndexHelper.java:91)
      	at com.atlassian.confluence.internal.index.lucene.LuceneIndexHelper.sizeOfIndex(LuceneIndexHelper.java:37)
      	at com.atlassian.confluence.internal.index.lucene.LuceneIndexHelper.sizeOfIndexMB(LuceneIndexHelper.java:52)
      	at com.atlassian.confluence.impl.index.DefaultIndexRecoveryService.onReIndexFinishedEvent(DefaultIndexRecoveryService.java:436)
      

            Assignee:
            Arun Antony
            Reporter:
            Bernardo Andreeti
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: