diff --git a/docs/compare-exchange/content/_delete-cmpxchg-items-csharp.mdx b/docs/compare-exchange/content/_delete-cmpxchg-items-csharp.mdx index f699229740..eee16ab16b 100644 --- a/docs/compare-exchange/content/_delete-cmpxchg-items-csharp.mdx +++ b/docs/compare-exchange/content/_delete-cmpxchg-items-csharp.mdx @@ -263,7 +263,12 @@ import CodeBlock from '@theme/CodeBlock'; long indexOfItem = resultOfDelete.Index; // The version of the deleted item // If 'successful' is true - the compare-exchange item was deleted. - // If 'successful' is false - the item was not deleted (index mismatch). + + // If 'successful' is false - + // * The item was not deleted because the index didn't match (it was modified by someone else). + // In this case, 'resultOfDelete.Value' will contain the current value stored on the server. + // * Or the item no longer existed at the time of deletion (it was already deleted). + // In this case, 'resultOfDelete.Value' will be null. } ``` @@ -281,14 +286,20 @@ import CodeBlock from '@theme/CodeBlock'; itemToDelete.Key, itemToDelete.Index); // Execute the delete operation by passing it to Operations.SendAsync - CompareExchangeResult resultOfDelete = await store.Operations.SendAsync(deleteCmpXchgOp); + CompareExchangeResult resultOfDelete = await + store.Operations.SendAsync(deleteCmpXchgOp); // Check results bool successful = resultOfDelete.Successful; // Has operation succeeded long indexOfItem = resultOfDelete.Index; // The version of the deleted item // If 'successful' is true - the compare-exchange item was deleted. - // If 'successful' is false - the item was not deleted (index mismatch). + + // If 'successful' is false - + // * The item was not deleted because the index didn't match (it was modified by someone else). + // In this case, 'resultOfDelete.Value' will contain the current value stored on the server. + // * Or the item no longer existed at the time of deletion (it was already deleted). + // In this case, 'resultOfDelete.Value' will be null. } ``` diff --git a/docs/compare-exchange/content/_delete-cmpxchg-items-nodejs.mdx b/docs/compare-exchange/content/_delete-cmpxchg-items-nodejs.mdx index 98733ea1b6..39bb9c6ff1 100644 --- a/docs/compare-exchange/content/_delete-cmpxchg-items-nodejs.mdx +++ b/docs/compare-exchange/content/_delete-cmpxchg-items-nodejs.mdx @@ -181,7 +181,12 @@ import CodeBlock from '@theme/CodeBlock'; const indexOfItem = resultOfDelete.index; // The version of the deleted item // If 'successful' is true - the compare-exchange item was deleted. - // If 'successful' is false - the item was not deleted (index mismatch). + + // If 'successful' is false - + // * The item was not deleted because the index didn't match (it was modified by someone else). + // In this case, 'resultOfDelete.value' will contain the current value stored on the server. + // * Or the item no longer existed at the time of deletion (it was already deleted). + // In this case, 'resultOfDelete.value' will be null. } ```