In the WeeklyReport/Sheng.Enterprise.Core/WeeklyReportManager.cs, there may be a possible bug in the function WeeklyReport GetWeeklyReport(...) .
As the data grows, the time connecting to the server is becoming longer. And it is not reliable to throw exception according to the following count value. We've encountered this issue this morning after the WeeklyReport system has been peacefully running several month.
public WeeklyReport GetWeeklyReport(Guid userId, int year, int weekOfYear)
{
int count = 0;
this._dataBase.ExecuteScalar<int>("SELECT COUNT(1) FROM [WeeklyReport]", delegate(int scalarValue)
{
count = scalarValue;
});
if (count >= 500)
{
throw new Exception("在建立与服务器的连接时出错,错误代码:5392");
}
At present, we've just changed the 500 value to 10000, and the issue has been solved. However, in the long run, there may be a better way to cope with this issue.
Huskier