Issues with the OnPublishEndAsync index update strategy


Description

The following issues may occur when using the OnPublishEndAsync strategy to update search indexes.

Issue 1

Note: This issue has been fixed in Sitecore CMS 7.2 Update-5 (rev. 140408), XP 8.0 Update-6 (rev. 151127) and 8.1 Update-1 (rev. 151207).

Obsolete item versions may persist in search indexes after publishing. This may result in search indexes becoming out of sync with the actual website content.

Issue 2

Note: This issue has been fixed in Sitecore XP 8.2 Initial Release (rev. 160729).

When using XP Sitecore 8.0 Update-3 (rev. 150427) or later, the index update operation may fail with the following error on rare occasions:

ERROR An item with the same key has already been added.
Exception: System.ArgumentException
Message: An item with the same key has already been added.
Source: mscorlib
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Sitecore.ContentSearch.Maintenance.Strategies.OnPublishEndAsynchronousStrategy.ProcessQueue(IEnumerable`1 queue, Action`2 addElement)
   at Sitecore.ContentSearch.Maintenance.Strategies.OnPublishEndAsynchronousStrategy.ExtractIndexableInfoFromQueue(List`1 queue)
   at Sitecore.ContentSearch.Maintenance.Strategies.OnPublishEndAsynchronousStrategy.Run()
   at Sitecore.ContentSearch.Maintenance.OperationMonitor.ExecuteAction()

Solution

For Sitecore CMS 7.2 Update-4 (rev. 150408):

Apply the following patch to address the issue:

  1. Place the Sitecore.Support.440383.dll assembly in the \bin folder.
  2. Place the Sitecore.Support.440383.config file in the \App_Config\Include folder.

For Sitecore XP 8.0 Update-3 (rev. 150427) — 8.0 Update-5 (rev. 150812):

Apply the following patch to address the issue:

  1. Place the Sitecore.Support.440383.449997.dll assembly in the \bin folder.
  2. Place the Sitecore.Support.440383.449997.config file in the \App_Config\Include folder.

For Sitecore XP 8.0 Update-6 (rev. 151127) and later versions – contact Sitecore Support.

Note: the provided configuration files patch the default onPublishEndAsync strategy definition. Please adjust those files appropriately if you have any custom strategy based on the onPublishEndAsync one.