{"record":{"id":"be513145278903dc","repo":"dotnet/orleans","slug":"azure-table-transactional-state-storage-conflict","errorCode":null,"errorMessage":"Azure Table transactional state storage conflict. Partition={key.PartitionKey} ActionIndex={actionIndexText} ActionType={actionType} RowKey={rowKey} HttpStatus={requestFailedException.Status} ErrorCode={errorCode} FailedOperationIndex={failedOperationIndexText}","messagePattern":"Azure Table transactional state storage conflict\\. Partition=(.+?) ActionIndex=(.+?) ActionType=(.+?) RowKey=(.+?) HttpStatus=(.+?) ErrorCode=(.+?) FailedOperationIndex=(.+?)","errorType":"exception","errorClass":"InconsistentStateException","httpStatus":null,"severity":"error","filePath":"src/Azure/Orleans.Transactions.AzureStorage/TransactionalState/AzureTableTransactionalStateStorage.cs","lineNumber":486,"sourceCode":"                                    i,\n                                    batchOperation[i].ActionType,\n                                    requestFailedException.Status,\n                                    errorCode,\n                                    failedOperationIndexText);\n                            }\n                        }\n\n                        LogErrorTransactionalStateStoreConflict(\n                            logger,\n                            key.PartitionKey,\n                            actionIndexText,\n                            actionType,\n                            rowKey,\n                            requestFailedException.Status,\n                            errorCode,\n                            failedOperationIndexText);\n\n                        throw new InconsistentStateException(\n                            $\"Azure Table transactional state storage conflict. Partition={key.PartitionKey} ActionIndex={actionIndexText} ActionType={actionType} RowKey={rowKey} HttpStatus={requestFailedException.Status} ErrorCode={errorCode} FailedOperationIndex={failedOperationIndexText}\",\n                            \"Unknown\",\n                            key.ETag.ToString());\n                    }\n                    catch (Exception ex)\n                    {\n                        if (logger.IsEnabled(LogLevel.Trace))\n                        {\n                            for (int i = 0; i < batchOperation.Count; i++)\n                            {\n                                LogTraceBatchOpFailed(\n                                    logger,\n                                    batchOperation[i].Entity.PartitionKey,\n                                    batchOperation[i].Entity.RowKey,\n                                    i,\n                                    batchOperation[i].ActionType,\n                                    ex is RequestFailedException requestFailedException ? requestFailedException.Status : 0,\n                                    ex is RequestFailedException { ErrorCode: { } errorCode } ? errorCode : \"Unavailable\",","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Transactions.AzureStorage/TransactionalState/AzureTableTransactionalStateStorage.cs#L468-L504","documentation":"Thrown by AzureTableTransactionalStateStorage when a batch table operation fails with an HTTP conflict (e.g. 412 Precondition Failed / 409) during a Store. The error is surfaced as InconsistentStateException carrying partition, action index/type, row key, HTTP status, and error code for diagnostics.","triggerScenarios":"An entity batch operation hits an etag precondition failure or storage-level conflict while preparing/committing transactional state.","commonSituations":"Concurrent writers to the same partition; throttling (429) reclassified as conflict; partial batch where some entities changed.","solutions":["Retry after re-loading the snapshot to refresh etags.","Inspect the logged Partition/RowKey/HttpStatus/ErrorCode to identify the conflicting entity.","Lower concurrency on the grain or batch size.","Check for Azure Table throttling and apply backoff."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await storage.Store(...); }\ncatch (InconsistentStateException ex)\n{ logger.LogWarning(ex, \"conflict on {Partition}\"); await Task.Delay(backoff); await storage.Load(); await storage.Store(...); }","preventionTips":["Inspect logged Partition/RowKey/HttpStatus/ErrorCode to find the hot entity.","Apply exponential backoff for Azure Table throttling."],"tags":["transactions","azure-table","storage-conflict","optimistic-concurrency","azure"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}