Skip to content

Commit 80b130c

Browse files
author
Sophia Tevosyan
committed
more comment updates
1 parent a937669 commit 80b130c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,10 @@ static string GetBlobName(TableEntity entity, string property)
12031203
}
12041204
catch (DurableTaskStorageException ex)
12051205
{
1206-
// The status code is "Conflict" for a null eTagValue and TableTransactionActionType.Add, and "PreconditionFailed" for a non-null eTagValue and TableTransactionActionType.UpdateMerge
1206+
// Handle the case where the the history has already been updated by another caller.
1207+
// Common case: the resulting code is 'PreconditionFailed', which means "eTagValue" no longer matches the one stored, and TableTransactionActionType is "Update".
1208+
// Edge case: the resulting code is 'Conflict'. This is the case when eTagValue is null, and the TableTransactionActionType is "Add",
1209+
// in which case the exception indicates that the table entity we are trying to "add" already exists.
12071210
if (ex.HttpStatusCode == (int)HttpStatusCode.Conflict || ex.HttpStatusCode == (int)HttpStatusCode.PreconditionFailed)
12081211
{
12091212
this.settings.Logger.SplitBrainDetected(

0 commit comments

Comments
 (0)