Bug watches aren't getting updated in an ordered fashion

Bug #300634 reported by era
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Graham Binns

Bug Description

Bug #278964 has a remote bug watch whose status is not correctly synced. Older bugs such as bug #70585 and bug #107672 seem to work correctly.

Bug 278964 was last checked by checkwatches on 2008-10-20, six days ago. Bug watches should be updated once every 24 hours or thereabouts, so this interval between checks suggests that something is going wrong with checkwatches somewhere.

Also, quite a few debbugs bug watches haven't been checked since creation (see https://bugs.edge.launchpad.net/bugs/296103/+watch/49092, which was created on 2008-11-18 and https://bugs.edge.launchpad.net/bugs/290981/+watch/48347, which was created on 2008-10-30 (!)).

The problem appears to be that we don't apply a particular order to the set of bug watches that we select our batches from, so the never updated bug watches are often left un-checked whilst the have-been-updated ones are checked with more regularity.

The order should be:

 1. Bug Watches never checked
 2. Bug watches checked > 24 hours ago
 3. Everything else.

It would be worth making the result set a UNION of (`BugWatch.lastchecked IS NULL`, `BugWatch.lastchecked > now + 24 hours`) rather than just selecting based on either of those being true.

Revision history for this message
Graham Binns (gmb) wrote :

This should be fixed when the bug watch updater checks this bug today (there can be up to a 24 hour delay between a remote bug's status changing and Launchpad pulling in the new status). I can't reproduce the problem locally so we'll wait for the bug watch to be updated in today's run before deciding whether this is actually a problem.

Changed in malone:
status: New → Incomplete
Revision history for this message
era (era) wrote :

According to the activity log http://bugzilla.gnome.org/show_activity.cgi?id=554628 it was changed on 2008-11-07 20:06:55 UTC so it has certainly been more than 24 hours by now.

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 300634] Re: gnome-bugs bug watch broken?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

2008/11/22 era:
> According to the activity log
> http://bugzilla.gnome.org/show_activity.cgi?id=554628 it was changed on
> 2008-11-07 20:06:55 UTC so it has certainly been more than 24 hours by
> now.

According to https://bugs.edge.launchpad.net/bugs/278964/+watch/47324,
the bug watch was last checked on 2008-11-20. Bug watches should be
checked once every twenty-four hours at least, so this is something
that needs looking into.

 status triaged
 importance high
 assignee gmb
 milestone 2.1.12

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: http://getfiregpg.org

iEYEARECAAYFAkkocsEACgkQwutMq02tGPqKZQCcDHHnZiiGLdzbly5PaRQpB6CV
s7wAn1uO89e3n/OLPViUHKmC3ub/iO78
=tAQY
-----END PGP SIGNATURE-----

Changed in malone:
assignee: nobody → gmb
importance: Undecided → High
milestone: none → 2.1.12
status: Incomplete → Triaged
Graham Binns (gmb)
description: updated
Revision history for this message
Graham Binns (gmb) wrote : Re: Bug watches aren't getting updated regularly

I think part of the problem is that we're not updating things in a sane order.

Consider this snapshot of the bug watches that need updating for debbugs and gnome bugs, taken at 16:50 UTC using the query at https://pastebin.canonical.com/11566/:

 * debbugs
 -- Total watches: 8728
 -- Watches needing update: 2072
 -- Watches never checked: 232
 * gnome-bugs
 -- Total watches: 9746
 -- Watches needing update: 2418
 -- Watches never checked: 390

Versus this one, taken at ~1800UTC

 * debbugs
 -- Total watches: 8732
 -- Watches needing update: 2078
 -- Watches never checked: 236
 * gnome-bugs
 -- Total watches: 9748
 -- Watches needing update: 2299
 -- Watches never checked: 391

So, unchecked watches are being checked, but there's still a lot of them and considering that we check up to 100 watches every ten minutes there should surely be less (or none) of them over an hour after the initial sample was taken.

ISTM that we're selecting the bug watches to be updated in a haphazard fashion rather than updating the never checked ones first, followed by the oldest ones (though we then have the problem of dealing with bug watches that haven't changed for months, which is the subject of bug 302529). If we start doing this it should clear out the backlog and may fix the issue about which this bug was originally filed.

description: updated
Graham Binns (gmb)
Changed in malone:
status: Triaged → In Progress
Revision history for this message
Graham Binns (gmb) wrote :

Didn't land this cycle due to UDS and test failures.

Changed in malone:
milestone: 2.1.12 → 2.2.1
Revision history for this message
era (era) wrote :

(Dunno if it's at all related, but https://bugs.launchpad.net/bugs/47889 says "Invalid" for the upstream bug when in fact the status for http://bugzilla.gnome.org/show_bug.cgi?id=548211 is "RESOLVED FIXED".)

Revision history for this message
petski (petski) wrote :

(Don't know if the following is related as well. Please let me know if I need to create a new bugreport.)

The "CPAN RT" tracker doesn't seem to update as well (or I'm just too impatient?):

https://bugs.launchpad.net/bugs/228679/+watch/50457
https://launchpad.net/bugs/bugtrackers/cpan-rt

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 300634] Re: Bug watches aren't getting updated in an ordered fashion

2009/1/4 petski:
> (Don't know if the following is related as well. Please let me know if I
> need to create a new bugreport.)
>
> The "CPAN RT" tracker doesn't seem to update as well (or I'm just too
> impatient?):

That looks (from the logs) as though it's a separate problem. Please
file a new bug report at http://bugs.launchpad.net/malone/+filebug and
we'll look into it.

Revision history for this message
Graham Binns (gmb) wrote :

Moving this back to Triaged for now as there's been no significant movement on it this cycle. It's still high priority and needs to be fixed sooner rather than later.

Changed in malone:
status: In Progress → Triaged
Graham Binns (gmb)
Changed in malone:
milestone: 2.2.1 → 2.2.2
Changed in malone:
importance: High → Medium
milestone: 2.2.2 → 2.2.3
Revision history for this message
Rolf Leggewie (r0lf) wrote :

bug 236041 is/was another example

Graham Binns (gmb)
Changed in malone:
importance: Medium → High
Graham Binns (gmb)
Changed in malone:
status: Triaged → In Progress
Revision history for this message
Björn Tillenius (bjornt) wrote : Bug fixed by a commit

Fixed in devel r7907.

Changed in malone:
status: In Progress → Fix Committed
Revision history for this message
Graham Binns (gmb) wrote :

Landed on devel in r7907.

Revision history for this message
Graham Binns (gmb) wrote :

Here's the current unchecked watch counts for debbugs and gnome-bugs (two of the bigger bug trackers):

  name | count
------------+-------
 debbugs | 9453
 gnome-bugs | 10873

We can use this to check that the fix works; it would be a good idea, if it works, to CP it to production as soon as possible.

Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.