The issue was actually different than the one Nick faced in the past. Our Scheduled job that clears our accumulated reputation scores for Day/Week/Month/Quarter/Year works extra hard on Jan 1st, since it has to update every single one of those timeframes.
The scheduled job runs such update in batches of 50k rows, and the code that runs it keeps a loop as long as the affected rows in the database are equal to 50k. The issue with that is that a database update (even with top (50000)
in the update query) can return more than the desired amount, in case a database trigger makes it so more than 50k rows are affected. The loop was breaking prematurely.
The fix was a one character change in the loop validation from a ==
check to a >=
check. We then ran a manual update on the existing data and it should be good now.
Appreciate the report!