This document explains how to upgrade and patch a system for Azure Storage Persistence bug #74 using NServiceBus.Azure hotfix release 6.2.5.
When upgrading to NServiceBus.Persistence.AzureStorage version 1 and above, the following upgrade will need to be performed prior to beginning any other upgrade steps.
The saga de-duplication patch process must be completed at least once prior to proceeding with this update.
How to know if a system may be affected
This bug will affect any system that has ever used sagas and NServiceBus.Azure versions 6.2.4 or below.
Patch requirements
To deploy this fix throughout a system, all endpoints must be upgraded and saga data that has been stored by the Azure Storage persister must be patched.
Upgrading endpoints
All endpoints using NServiceBus.Azure must be upgraded to version 6.2.5 or above.
Patching data
Saga data stored in Azure must 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.
Patch steps
- 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.
- The
IndexPruner
utility requires an Azure Storage connection string. The connection string can be added to theIndexPruner.
file with theexe. config 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
IContainSagaData
which will indicate the sagas that need to be pruned in Azure Storage. - Open a command line and run the following command:
IndexPruner.
. If the Azure connection string was not added to theexe IndexPruner.
file in step 2, the command needed to run theexe. config IndexPruner
will beIndexPruner.
. While running, theexe <connectionstringvalue> IndexPruner
will output details of the actions that it is taking to the command window. - Update the NServiceBus.Azure dependency to version 6.2.5 or higher in all endpoints that use it and release the updated endpoints.