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

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

      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)
      

            [CONFSERVER-73508] Confluence index size calculation not working for manual reindex from scratch after split index upgrade task

            Arun Antony made changes -
            QA Demo Status Original: Done [ 14331 ] New: Not Needed [ 14332 ]
            QA Kickoff Status Original: Done [ 14235 ] New: Not Needed [ 14236 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Arun Antony made changes -
            Fix Version/s New: 9.2.0 [ 110293 ]
            Fix Version/s New: 8.5.18 [ 110396 ]
            Arun Antony made changes -
            QA Demo Status Original: Not Done [ 14330 ] New: Done [ 14331 ]
            QA Kickoff Status Original: Not Done [ 14234 ] New: Done [ 14235 ]
            Testing Notes New: Did test and verified the event from Analytics page
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "EXPSBAJPAI A1 Server. Master Baseline › Main unit and integration tests › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964389 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "A1 Server. Master Baseline › Setup and upgrade tests, Postgres 14 › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964293 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "A1 Server. Master Baseline › Database Integration Tests › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964421 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "A1 Server. Master Baseline › Main Plugins - Jira-Integration › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964420 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "A1 Server. Master Baseline › Code Check - Static Analysis › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964292 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "A1 Server. Master Baseline › Main Plugins - Ancillary › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964291 ]
            Sumedha Bajpai made changes -
            Remote Link New: This issue links to "A1 Server. Master Baseline › Main Tests (Postgres 16) › issue-CONFSERVER-73508-fix-build-failure (server-syd-bamboo)" [ 964419 ]

              33fcd7e92bd6 Arun Antony
              bandreeti Bernardo Andreeti
              Affected customers:
              2 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: