Unread counts incorrect on dev.newsblur.com

It looks like i’m still having the same trouble.

One example i have is for deadspin.com. I had everything marked as read about 1.5 - 2 hours ago, there are now 4 new articles that are actually new which are marked unread, but it also marked the prior 9 articles as unread. The count on the main feed still show there are no new articles.

Yeah, that sounds exactly like a date bug. Do you remember where you left off with deadspin? How many unread stories did you have? I’m hoping 0 (including red, yellow, and green), because that means the unread count was moved to a story. 9 stories… would you say that covers about 5-8 hours? Way less? Way more? It might be a timezone bug, but there’s no way that could manifest itself just now after all this time.

Here’s a screenshot. It’s showing 6 unread now in the total for the feed.

Everything below the “read” one (5th from the top) was marked as read earlier in the day and the feed showed no unreads. The “how to make a pipe” one i marked read at about 8 PM or so.

I dunno, i’m not too worried about it. Maybe there was some leftover weirdness after you applied that fix earlier. I’ll check on it tomorrow and let you know.

Bingo, I think I found it. I have 4 feed fetchers, one of them I added about 2-3 weeks ago (uhh, maybe 4 weeks now?). The newest one I added is using a newer version of Django, which has this weird timezone support. It’s highly likely that it is setting the timezone incorrectly, and since you read all of the stories, the mark_as_read bar has been moved to a position about 5-8 hours off from where it should be.

I just fixed this, so please let me know if this happens again. Also, to make matters worse, it’s hard to tell if this when this happens again it’s fallout from this bug or the same bug. To address that, I’m going to run a counting script, which takes 2-3 hours to run.

That timeframe fits in pretty well with about when first noticed the unread counts were going slightly wonky.

I’ll keep you updated. Thanks for all of your help!

The problem is still happening here. I just signed on to Newsblur and I clicked a feed with ‘0 new stories’ because I /knew/ something must have been published tonight, sure enough there were 2 unreads.

The unread counts are off by 1 sometimes, but usually more, sometimes even 10+ with an active feed.

Ryan seems to be describing the exact problems I am having. Furthermore, I neglected to mention but I have also suspected that stories I previously read were being marked as unread at some point. It seems to happen in particular in one feed which only posts around 4-8 articles a day. I don’t think it’s related to marking as read or even time zones, however, because sometimes I’ll see posts from the previous day as unread. I’ve used this RSS since I signed up for Newsblur and it never had any such problem before.

FWIW, I almost always clear this entire folder down to 0 unreads before bed and the problems still happen first time I sign in the next day.

I always use WWW.

I never use Newsblur on my phone – OT: I wish there was an Android app as good as gReader for Newsblur, I bought Blar but it’s Blah… wish I had my dollar back :P.

Anyway, I will try to get my unread count down to close to 0 as I can tonight and I’ll report back tomorrow.

No, I only use dev.newsblur … just wanted to clarify, in case it helped.

I’m still having these issues atm on www and iOS.

Things look better over here today.

  • I have had the same problems since signing up a couple of days ago

  • as of today it looks better. NewsBlur and NetNewsWire (set-up for testing) appear to be in sync

It looks to me like you found the bug :slight_smile: I hope I am right…

All of my feeds seem fine today. There was some leftover strangeness from yesterday, but all of the feeds / articles from last night forward are correct.

Thank you again!

Status quo here, no improvement at all. Pretty much every feed I click on is off (my first login since last night).

What’s your username?

This sums up the problems I’m having also. My username is jzsimon.

Eureka! Found the bug. Turns out all of my meddling above was nice and all, but the real problem is slave lag.

My task servers are reading from MongoDB slaves, but they are writing to the master. Problem is, as an optimization, when those stories get written, I immediately read all stories from the past 2 weeks (from slave) and use them to count unread counts. I was missing all of the new stories, because the lag from writing to master and then waiting for it to propagate down to the slaves was too long. That also explains why this bug is so random and is now getting worse. My slave lag is going up!

The fix is to either fix the slave lag, or swap to reading from master for this one call. I could also perform a safe write the ensures things are written to a majority of slaves, but that won’t fix the bug entirely. But if I swap to read from master, that’s a huge hit to the same db that serves users, meaning the average load time will spike.

Not sure what I’ll decide to do, but I’m going to investigate and perform some load tests to figure out the right solution. Good news is that this is without a doubt the cause of the bug.

2 Likes

That’s great news, what a relief!

Please let us know when you think you’ve squashed it, hopefully soon.

Thanks for your work sorting this out.

After a pause, the issue is back :frowning:

If you refresh the page, is the count correct? Are you on https?

Note that I just made some major db upgrades last night, so I am fully expecting to see the fallout from that today.

Yes, refresh worked, but before it worked, it emptied by entire stream (no feeds listed at all). Had to close the browser and restart it and now the counts seem correct.

Not on https.