41

It looks like flair data has some issues, here are screenshots from my Wordpress.com blog and profile pages. As you can see I have ~1K rep on the Server Fault, but flair thinks that I have 137K more:


Wordpress.com Flair


Profile


Top


6
  • 7
    Well, that's certainly... an odd bug.
    – Doorknob
    Commented Jan 20, 2016 at 12:00
  • 6
    Looks like you got mixed up with SF top user, serverfault.com/users/13325 Commented Jan 20, 2016 at 12:24
  • 6
    You must have been working really hard :D
    – nicael
    Commented Jan 20, 2016 at 13:24
  • 4
    Well, congratulations, I guess. :) Commented Jan 20, 2016 at 13:29
  • 13
    I blame Robin Hood. I knew it was just a matter of time before that scoundrel turned to rep.
    – user50049
    Commented Jan 20, 2016 at 13:58
  • 2
    A fix is incoming, I'll post details here in a bit.
    – Nick Craver Mod
    Commented Jan 20, 2016 at 17:07

2 Answers 2

25

So like most things in life, this was my fault. Historically we had 2 systems for getting data and never really finished moving to the latter. One of those artifacts came up with some Developer Timeline work that showed us doing an unnecessary HTTP request to the 2.0 API to get your user list for the Communities section of the profile. There's no need for that overhead, we've got database access.

We also didn't need to cache the number of strings returned with a !8.(3p54UxIbJyv5MuonC6aUPxvldcj7CbjQXT8 filter, since we have the sites readily available in local cache all we needed was an integer. So we could save time, an HTTP request, deserialization time, allocations, redis wire time, and memory all by switching over to a faster database query.

Paired with this was code cleanup: moving these methods from User since "getting other network users" didn't really belong there, to Account. That's where this line of code didn't get changed:

Hooks.UserReputationChanged(Id, user.Reputation, Current.Site.Id);

It should have been:

Hooks.UserReputationChanged(user.Id, user.Reputation, Current.Site.Id);

So...my bad. It should be fixed as cache expires since the place this happens is in the correction logic. This section of code was written to sync up what you see with what is returned. Since the network-wide aggregation can lag up to a second we need to replace the current-site data in the return set to match your top bar so it appears in sync. If a difference is detected, we also issue an aggregator request to fix it...just in case. That's the code that was getting hit here.

If anyone has more questions I can clarify a bit, I just thought some background on how this works may be helpful.

5
  • Thanks, it was fun while it lasted :). Commented Jan 20, 2016 at 17:55
  • Why weren't other accounts affected though? I've checked serverfault.com/users/1000/kris and stackexchange.com/users/1000/dan-blair a few hours ago and there was no problem with their flairs.
    – nicael
    Commented Jan 20, 2016 at 18:00
  • 6
    @nicael because only hitting an aggregator skew on a cache miss (both very unlikely) would trigger the condition
    – Nick Craver Mod
    Commented Jan 20, 2016 at 18:01
  • 6
    @nicael Well, I personally enjoyed being a chosen one :) Commented Jan 20, 2016 at 18:01
  • 1
    @beatcracker It's okay, ewwhite would have caught up with you pretty quickly.
    – Andrew B
    Commented Jan 21, 2016 at 10:38
21

I found a pretty strange coincidence, after having seen @Sha's comment. The network-wide profile of ewwhite has this link:

http://stackexchange.com/users/270504/ewwhite

And yours Server Fault profile has the same id:

http://serverfault.com/users/270504/beatcracker

This is weird, but could be the reason (and probably someone's else has been also affected).

9
  • 1
    Huh! Excellent detective work! Commented Jan 20, 2016 at 13:43
  • 4
    Nice find. :) I guess...
    – ewwhite
    Commented Jan 20, 2016 at 14:14
  • Not only flair, it also shows the borked rep in his MSE profile: i.sstatic.net/vUHWy.png. Commented Jan 20, 2016 at 14:33
  • @Sha Yup, noticed, I believe it's just a consequence.
    – nicael
    Commented Jan 20, 2016 at 15:04
  • IMO there is some global repository for cached reputation, used both for global flair and the per-site "Communities" mini list reputation, and when it was updated, there was some mixup Commented Jan 20, 2016 at 15:06
  • Anyway, this reminds me of the rep eating worm (not you, @nic ;)) just the opposite - you was around when that super bug hit? Commented Jan 20, 2016 at 15:13
  • @Sha Nope, or at least I don't recall. Does it have a dedicated question?
    – nicael
    Commented Jan 20, 2016 at 15:17
  • meta.stackexchange.com/questions/213000/… Commented Jan 20, 2016 at 15:18
  • @Sha Ah, seen this :)
    – nicael
    Commented Jan 20, 2016 at 15:22

You must log in to answer this question.

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