Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide how to move forward deprecating compatibility mode for Saga lookup #836

Open
kentdr opened this issue Sep 11, 2023 · 0 comments
Open

Comments

@kentdr
Copy link
Member

kentdr commented Sep 11, 2023

Background

NServiceBus.Persistence.AzureStorage Version 1 and 2 used a SecondaryIndex entity to find the saga. The secondary index entry used a partition key Index_{sagaDataTypeName}_{correlationProperty.Name}_{Serialize(correlationProperty.Value)}and a RowKey with string.Empty.

https://github.com/Particular/NServiceBus.Persistence.AzureTable/blob/b0a558882ca8004c264fa88ee3380f7ae78a9dcb/src/NServiceBus.Persistence.AzureStorage/SagaPersisters/SecondaryIndices/SecondaryIndexKeyBuilder.cs#L13C47-L13C146

The secondary index algorithm did attempt to load things by the well know partition and row key or in the worst case tried to fall back to a full table scan based on the Saga ID.

NServiceBus.Persistence.AzureTable version 3 was built to be by default fully compatible with NServiceBus.Persistence.AzureStorage Version 1 and 2

It supports both sagas that use secondary index entries as well as sagas that don't have a secondary index entries. By default the persister operates in the compatibility mode but doesn't fall back to full table scans. If compatibility with sagas stored with Version 1 of the persister is required full table scan has to be enabled.

https://docs.particular.net/persistence/upgrades/asp-2to3#compatibility

The table scanning was made opt-in because it is a very expensive operation that can create huge costs on larger tables.

NServiceBus.Persistence.AzureTable version 4 disabled the compatibility mode by default

This package continues to be fully compatible with the NServiceBus.Persistence.AzureStorage version 1 and 2. It supports both sagas that use secondary index entries as well as sagas that don't have a secondary index entries. It's important to note that the compatibility mode does need to be manually enabled. It has been disabled by default in favor of performance.

https://docs.particular.net/persistence/upgrades/asp-4to5#switching-to-azure-data-tables-compatibility-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant