Yesterday my reputation total increased by 1 point. As far as I know there is (was) no action which would trigger 1 point increase (downvoting gives $-1$, accepting an answer gives $+2$, etc.) I am curious what was the cause of a 1-point increase. Does anybody know?
This is an artifact of the recalc process that runs every night. To see what happens, let's take the simple 2 request case. These are happening in Parallel:
|(Start)----(Get your Rep: 10)------(Add 10 rep from upvote)-----(Save Rep=20 to DB)| |(Start)-------(Get your Rep: 10)------(Add 15 rep from accept)------(Save Rep=25 to DB)|
This race happens in several cases, including when reversing a downvote (or even a deletion refunding that downvote, possibly unrelated to your browsing).
The key here is that when the save happens, the database update is
= in Linq2SQL (one reason we're slowly removing it and not using it for new things), it's not
-= which would solve the problem. To be technically accurate, it would greatly narrow the scope of it by narrowing the race window due to our
READ UNCOMMITTED transaction isolation level, not 100% solve it.
Anyway, it happens. It will continue to happen as long as we have many, many things happening at once. However, a nice side-effect of us implementing a RepHistory table that records everything is that new rows don't conflict in a race, they just work. Given that, we can simply total up your history and check it against your current rep...if it doesn't match then we perform a recalc - that's what happened here.