-
Notifications
You must be signed in to change notification settings - Fork 27
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
Validate if snapshot isolation is enabled when outbox is launched with pessimistic concurrency enabled #1370
Comments
@ramonsmits Do you have any details or background for why these options are not compatible? We commonly set snapshot isolation as our default isolation mode and we are looking at starting to use the NSB Outbox and prefer pessimistic concurrency to support high throughput. |
Snapshot isolation is optimistic concurrency control. Changes are applied at commit and not earlier with locking. |
Thanks! I am realizing today that I knew less about snapshot isolation than I had thought. This issue is specifically targeted at the Outbox Pessimistic locking enabled like this: var outboxSettings = endpointConfiguration.EnableOutbox();
outboxSettings.UsePessimisticConcurrencyControl(); Right? |
@bbrandt Yes, with Snapsnop isolation is great for not locking data and reduce page/table locks because of this but actually not great when with block contention as it will increase conflicts. |
UPDLOCK can be used
@SzymonPobiega @tmasternak we tested this recently right? |
Describe the feature.
Validate if snapshot isolation is enabled when outbox is launched with pessimistic concurrency enabled.
When snapshot isolation is enabled queries are not able to use pessimistic concurrency. The endpoint should not launch when it detects that snapshot isolation is enabled.
For example, with SQL Server:
Sources:
For SQL Server
Only querying a specific database might not be sufficient but its important that the catalog that stored the outbox data does not use snapshot isolation.
Additional Context
No response
The text was updated successfully, but these errors were encountered: