-
Notifications
You must be signed in to change notification settings - Fork 21
Add retries to queries run by ImportAzureCdnStatistics #763
Conversation
|
||
transaction.Rollback(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The transaction will be automatically rolled back when an exception is thrown at await bulkCopy.WriteToServerAsync(downloadFactsDataTable);
...no need for this call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please get sign off from someone that's familiar with this code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please get sign-off from someone more expert in SQL error codes and retriability.
Thanks for the reviews everyone! I will deploy this to DEV and make sure everything is okay and then merge. |
Activate assembly modules and add more base configuration types to DI Consider 4XX as successfully for telemetry purposes Add KnownOperation for the V3 search endpoint Progress on NuGet/Engineering#3020
Activate assembly modules and add more base configuration types to DI Consider 4XX as successfully for telemetry purposes Add KnownOperation for the V3 search endpoint Progress on NuGet/Engineering#3020
I saw a lot of deadlettered stats blobs due to retriable SQL exceptions while I was on-call last week.
Specifically, I saw a lot of
I looked at the code and saw that we had no retry logic around it at all. I looked at our other SQL calls in
NuGet.Jobs
and noticed that we typically use DapperExtensions to retry, but due to the nature of the SQL queries we are running here (bulk SQL copy and a structured parameter) it was not possible to use Dapper as well so I did some refactoring to allow us to share the retry logic between Dapper and non-Dapper queries.