This document explains how to upgrade and patch a system for Azure Storage Persistence bug #74 using NServiceBus.Azure hotfix release 6.2.5.
This bug will affect any system that has ever used sagas and NServiceBus.Azure Versions 6.2.4 or below.
To deploy this fix throughout a system, all endpoints will need to be upgraded and saga data that has been stored by the Azure Storage persister will need to be patched.
All endpoints using NServiceBus.Azure will need to be upgraded to Version 6.2.5 or above.
Saga data stored in Azure will need to be patched using the
IndexPruner utility which can be downloaded from https://github.com/Particular/IssueDetection/releases/tag/nsb.azure.284. This utility will remove all orphaned secondary indexes from the Azure Storage Tables.
- Download the index pruning tool from https://github.com/Particular/IssueDetection/releases/tag/nsb.azure.284 to a computer that has the .NET Framework 4.5.2 installed and also has internet access.
IndexPrunerutility requires an Azure Storage connection string. The connection string can be added to the
IndexPruner.exe.configfile with the
name="sagas"value or provided as a command line parameters (shown in step 4).
<configuration> <connectionStrings> <add name="sagas" connectionStrings="--anAzureStorageConnectionString--"/> </connectionStrings> </configuration>
- Copy the endpoint dll along with the assemblies that contain saga type definitions to the same directory as the index pruning tool. If multiple endpoints require this patch, it is ok to add the assemblies for all the endpoints to the tool. This saves time from having to run the tool for each endpoint. These assemblies will be scanned to find all implementations of
IContainSagaDatawhich will indicate the sagas that need to be pruned in Azure Storage.
- Open a command line and run the following command:
IndexPruner.exe. If the Azure connection string was not added to the
IndexPruner.exe.configfile in step 2, the command needed to run the
IndexPruner.exe <connectionstringvalue>. While running, the
IndexPrunerwill output details of the actions that it is taking to the command window.
- Update NServiceBus.Azure dependency to version 6.2.5 or higher in all endpoints that use it and release the updated endpoints.