markjprice / apps-services-net8

Repository for the Packt Publishing book titled "Apps and Services with .NET 8" by Mark J. Price
119 stars 55 forks source link

page 166 - stored procedures are the only way to ensure ACID #3

Closed sikora507 closed 9 months ago

sikora507 commented 10 months ago

Stored procedures are the only way to ensure ACID (Atomic, Consistent, Isolated, Durable) transactions that combine multiple discrete activities into a single action that can be committed or rolled back. You cannot use client-side code to implement transactions.

What about transactional batch operations? Cosmos DB supports transactional batch operations within a single partition. This means you can execute a set of operations (such as inserts, updates, and deletes) in an atomic batch within a single logical partition. https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/transactional-batch?tabs=dotnet

markjprice commented 9 months ago

Thank you! I have added an errata item for this: https://github.com/markjprice/apps-services-net8/blob/main/docs/errata/errata.md#page-166---implementing-stored-procedures