Skip to content

Commit b9e4ef1

Browse files
committed
Merged PR 729798: Demote timeout and missing blob error traces in cache code
Seen in AnyBuild telemetry. ``` Failed to obtain properties from latest blob at path checkpoints:checkpointRegistry/rg-a01835ca5c25429f85223a4479a6022drg-a01835ca5c25429f85223a4479a6022d_20230413rg-a01835ca5c25429f85223a4479a6022d_20230413.latest.json.: Azure.RequestFailedException: Service request failed. Status: 404 (The specified blob does not exist.) ErrorCode: BlobNotFound ``` ``` Error during ReceiveBatchAsync: System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result) ```
1 parent ace5ffe commit b9e4ef1

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

Public/Src/Cache/ContentStore/Distributed/NuCache/AzureBlobStorageCheckpointRegistry.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Collections.Generic;
66
using System.Diagnostics.ContractsLight;
77
using System.Linq;
8+
using System.Net;
89
using System.ServiceModel.Description;
910
using System.Text.RegularExpressions;
1011
using System.Threading;
@@ -145,6 +146,11 @@ public Task<Result<CheckpointState>> GetCheckpointStateAsync(OperationContext co
145146
// Breaking from the loop instead of tracing error for each iteration.
146147
break;
147148
}
149+
catch (Azure.RequestFailedException reqEx) when (reqEx.Status == (int)HttpStatusCode.NotFound)
150+
{
151+
Tracer.Debug(context, $"Failed to obtain {nameof(CheckpointState)} - missing blob `{blob.ToDisplayName()}`. Skipping.");
152+
continue;
153+
}
148154
catch (Exception e)
149155
{
150156
Tracer.Error(context, e, $"Failed to obtain {nameof(CheckpointState)} from blob `{blob.ToDisplayName()}`. Skipping.");

Public/Src/Cache/ContentStore/Distributed/NuCache/EventStreaming/PartitionReceiverWrapper.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,26 @@ private async Task ReceivePumpAsync(OperationContext context, CancellationToken
131131
// ConsumerDisconnectedException is a special case where we know we cannot recover the pump.
132132
break;
133133
}
134+
catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
135+
{
136+
// Breaking from the loop instead of tracing error for each iteration.
137+
break;
138+
}
139+
catch (OperationCanceledException)
140+
{
141+
// One form of timeout.
142+
// Breaking from the loop instead of tracing error for each iteration.
143+
break;
144+
}
145+
catch (TimeoutException)
146+
{
147+
// Another form of timeout.
148+
// Breaking from the loop instead of tracing error for each iteration.
149+
break;
150+
}
134151
catch (Exception e)
135152
{
136-
Tracer.Error(context, e, "Error during ReceiveBatchAsync");
153+
Tracer.Error(context, e, $"Error during {nameof(ReceiveBatchAsync)}");
137154
continue;
138155
}
139156

0 commit comments

Comments
 (0)