Skip to content

Commit

Permalink
Update PostLedgerEntryOperation retry logic (Azure#38015)
Browse files Browse the repository at this point in the history
  • Loading branch information
PallabPaul authored Aug 16, 2023
1 parent 7a3d3ab commit 05b2a88
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Release History

## 1.2.0-beta.1 (Unreleased)
## 1.2.0 (2023-08-03)

### Bugs Fixed

- Service calls that result in a `HttpStatusCode.NotFound` status will now be retried by default. This is to handle scenarios where there is an unexpected loss of session stickiness when the connected node changes and transactions have not been fully replicated.

## 1.2.0-beta.1 (2022-11-09)

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/confidentialledger/Azure.Security.ConfidentialLedger",
"Tag": "net/confidentialledger/Azure.Security.ConfidentialLedger_48488df791"
"Tag": "net/confidentialledger/Azure.Security.ConfidentialLedger_5657482b45"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Client SDK for the Azure Confidential Ledger service</Description>
<AssemblyTitle>Azure Confidential Ledger</AssemblyTitle>
<Version>1.2.0-beta.1</Version>
<Version>1.2.0</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.1.0</ApiCompatVersion>
<PackageTags>Azure ConfidentialLedger</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,19 @@ internal ConfidentialLedgerClient(Uri ledgerEndpoint, TokenCredential credential
Array.Empty<HttpPipelinePolicy>() :
new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) },
transportOptions,
new ResponseClassifier());
new ConfidentialLedgerResponseClassifier());
_ledgerEndpoint = ledgerEndpoint;
_apiVersion = actualOptions.Version;
}

internal class ConfidentialLedgerResponseClassifier : ResponseClassifier
{
public override bool IsRetriableResponse(HttpMessage message)
{
return base.IsRetriableResponse(message) || message.Response.Status == 404;
}
}

/// <summary> Posts a new entry to the ledger. A collection id may optionally be specified. </summary>
/// <remarks>
/// Below is the JSON schema for the request and response payloads.
Expand Down

0 comments on commit 05b2a88

Please sign in to comment.