Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Hotfix: stats total download counts overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Bommarito authored Feb 15, 2017
1 parent dde504d commit ada7125
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task Run()
using (var connection = await StatisticsDatabase.ConnectTo())
using (var transaction = connection.BeginTransaction(IsolationLevel.Snapshot))
{
totalsData.Downloads = (await connection.ExecuteScalarWithRetryAsync<int>(
totalsData.Downloads = (await connection.ExecuteScalarWithRetryAsync<long>(
WarehouseStoredProcedureName, commandType: CommandType.StoredProcedure, transaction: transaction));
}
Trace.TraceInformation("Total downloads: {0}", totalsData.Downloads);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ BEGIN
SET NOCOUNT ON;

-- select total # of downloads + correction for packages that can not be mapped
SELECT SUM(ISNULL(F.[DownloadCount], 0)) - 21000000 AS [Downloads]
SELECT SUM(CAST(ISNULL(F.[DownloadCount], 0) AS BIGINT)) - 21000000 AS [Downloads]
FROM [dbo].[Fact_Download] (NOLOCK) AS F
END

0 comments on commit ada7125

Please sign in to comment.