What happens if one TableBatchOperation operation fails?

When executing a package, if one of the TableBatchOperation operations fails:

  • All operations in the batch are canceled.
  • All other valid operations processed
  • The first valid operations in the queue are processed until one operation is completed and subsequent ones are processed
+8
azure azure-table-storage
source share
2 answers

The answer is 1 - Even if one operation fails in a batch, the entire operation fails (or, in other words, a rollback). This is similar to performing transactions in a relational database. Interestingly, you get the index of the failed object in the response when this happens. Check this topic for more information: Azure CloudTable.ExecuteBatch (TableBatchOperation) throws a storage exception. How can I find which operations caused the exception?

+8
source share

The official blog post: http://blogs.msdn.com/b/windowsazurestorage/archive/2012/11/06/windows-azure-storage-client-library-2-0-tables-deep-dive.aspx

TableBatchOperations or transactions of a group of objects atomically mean that either all operations will succeed , or if it is an error caused by one of the individual operations, the whole batch does not work.

+4
source share

All Articles