UpdateSearchIndexObserver might throw an exception during application restart


Description

The following error might occur when the application restarts (for example, at the time of application pool reset, IIS restart, and so on). In such a case, the UpdateSearchIndexObserver fails to get initialized in the constructor:

Exception type: IndexNotFoundException 
Exception message: Index sitecore_marketingdefinitions_web was not found
   at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name) 
   at Sitecore.Marketing.Search.Observers.Activation.UpdateSearchIndexObserver`1..ctor(ILogger`1 logger, String databaseName, String searchIndex)

Solution

To resolve this issue, download and install the appropriate patch available on this page: https://github.com/SitecoreSupport/Sitecore.Support.255663/releases.
Contact Sitecore Support to get a solution for other Sitecore XP releases.