Path Analyzer 8.1 rebuilds data on startup


Description

During the initial launch of Sitecore XP 8.1 instance, Path Analyzer will attempt to rebuild data for all maps approximately 1 minute after the startup.

While this does not cause any issues on a clean installation, since xDB is empty, it might cause an unnecessary rebuild when having modified ConnectionStrings.config file just in time before the initial startup.

 

How To Check If You Have This Issue

Execute the following SELECT statement on the TreeDefinitions table to see if any records have status 0 ('New'):

select * from [TreeDefinitions] where [Status] = 0

If the query returns results, follow the steps from Solution 1 below.

If the query returns no results, then check the following:

select * from [TreeDefinitions]

Having any records with the value in the Status column "1" or "2" means that it is too late to apply Solution 1 below, as the rebuild process has already started.

Having a lot of data in xDB may not be desired. To stop this process, follow Solution 2 instead.

 

Solution 1: Prevent the rebuild process from launching

Run the following SQL script on any reporting database connected to your Sitecore XP 8.1 instance (in case you have primary and secondary reporting databases configured) prior to the initial startup of the application:

update [TreeDefinitions] set [Status] = 3 WHERE [Status] = 0

 

Solution 2: Stop the rebuild process if launched

To stop the rebuild process, follow these steps:

  1. Perform IISRESET on the Sitecore instance that is doing processing.
  2. Execute the following statement:

    update [TreeDefinitions] set [Status] = 3

  3. In MongoDb, locate the tracking_live database and delete everything from the TaskQueue collection, if it exists.
  4. If after a while, some records in the TreeDefinitions table get updated with status "-1", re-run step number 2.