6

The "quarter" and "year" tab in the "Users" tab results are incorrect.

Since the tooltip says the range is calculated from "2023-01-01 to today", but the result are showing for a different range, because 15.1k reputation is not possible to achieve in 5 days. Also week and month tabs are started from "2023-01-01 to today", and those users has less reputations only.

quaerter, month tab

5
  • 2
    Looks like the same issue happened again...
    – Andrew T.
    Commented Jan 5, 2023 at 11:20
  • 1
    This is not the first time. Sometimes it only affects a single month. This is the 3rd time (to my knowledge) that it failed for the yearly view.
    – Martijn Pieters Mod
    Commented Jan 5, 2023 at 17:12
  • 2
    Luckily, the last time this happened Nick built something to fix this quickly, should it happen again: so we have this fix we can now run (and run fast) if it happens again.. Knowing Nick, it'll be documented for whomever took over from him.
    – Martijn Pieters Mod
    Commented Jan 5, 2023 at 17:23
  • 2
    Update: I was told by a CM that the devs are aware and working on this. Hopefully we'll get a status update on this soon.
    – Martijn Pieters Mod
    Commented Jan 5, 2023 at 22:46
  • 1
    The numbers changed (to be lower) but they're not identical to the "month" page... I'm checking to see what the status is.
    – Catija Staff
    Commented Jan 6, 2023 at 15:44

1 Answer 1

6

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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .