XWiki Platform
  1. XWiki Platform
  2. XWIKI-8598

"Another rebuild is in progress." message displayed when trying to reindex the current wiki

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3-milestone-2
    • Fix Version/s: 4.3.1
    • Component/s: Search - Generic
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      1. Delete the <permanentDirectory>/lucene folder to start fresh
      2. Start XWiki and go to Administration > Applications > Search
      3. Refresh the page and wait for the initial index to finish (Number of elements in indexing queue = 0 and Number of indexed elements ~= 430)
      4. Select "Index the wiki" and press "Start Indexing"
      5. Re-open the page and check the indexing status, it will always be Number of elements in indexing queue = 0 and Number of indexed elements = 0
      6. Repeat step 4 and observe the "Another rebuild is in progress." message.

      Workaround: Delete the lucene folder and restart XWiki (Steps 1-3).

      Note: If you are on a multiwiki environment (XEM), using the "Index Farm" option works every time, so the problem is related to the "Index the wiki" option.

        Issue Links

          Activity

          Hide
          Eduard Moraru added a comment -

          This bug seems to be caused by a NPE in declareProperties(ExecutionContext executionContext) introduced by XWIKI-8322, more specifically, this commit that starts caching the XWikiContext but also sets it to NULL without making sure that it will be re-initialized. When the indexRebuilder object is used for the first time (first index building when XWiki first starts), declareProperties is called and the context then set to NULL. It is never re-initialized after that, causing the NPE when the user manually starts an indx rebuild operation.

          Because of this NPE, the code that clears the rebuildInProgress flag is never reached, so the operation will always report that it is already in progress and no documents will be added to the index queue.

          Show
          Eduard Moraru added a comment - This bug seems to be caused by a NPE in declareProperties(ExecutionContext executionContext) introduced by XWIKI-8322 , more specifically, this commit that starts caching the XWikiContext but also sets it to NULL without making sure that it will be re-initialized. When the indexRebuilder object is used for the first time (first index building when XWiki first starts), declareProperties is called and the context then set to NULL. It is never re-initialized after that, causing the NPE when the user manually starts an indx rebuild operation. Because of this NPE, the code that clears the rebuildInProgress flag is never reached, so the operation will always report that it is already in progress and no documents will be added to the index queue.
          Hide
          Eduard Moraru added a comment -

          I have removed the line that makes the XWikiContext instance null and the indexing now seems to behave correctly.

          Show
          Eduard Moraru added a comment - I have removed the line that makes the XWikiContext instance null and the indexing now seems to behave correctly.

            People

            • Assignee:
              Eduard Moraru
              Reporter:
              Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: