Loading...

musicbrainz-devel@musicbrainz.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

[mb-devel] modpending integrity (dropping < 0) Steve Wyles Thu Aug 31 20:06:24 2006


It seems there might be a little bug that is allowing the modpending columns in the db tables to drop below zero. [1]

From a quick scan of the code the modpending value is incremented
when a new edit is created against a row and it is them decremented when the mod is closed.

It appears there are a number of instances where this value has dropped below zero and because the code that determines whether it needs highlighting on the webpage only checks it against 0, the yellow highlighting is being displayed when there are no edits outstanding.

It is also possible that the highlighting is NOT being displayed in some instances where there are outstanding edits because the modpending value has dropped below zero in the past.

        Two things need to be done here:

        1. Fix the code so the value can never fall below zero.
        2. Synchronize the modpending values against the open mods.

I'm happy to raise a ticket for this, but thought it would be better to highlight here first.

Steve (inhouseuk)

[1]

musicbrainz_db=# select count(*) from artist where modpending <0;
 count
-------
    12
(1 row)

musicbrainz_db=# select count(*) from album where modpending <0;
 count
-------
    21
(1 row)

musicbrainz_db=# select count(*) from track where modpending <0;
 count
-------
   101
(1 row)

musicbrainz_db=# select count(*) from l_album_artist where modpending <0;
 count
-------
    11
(1 row)

musicbrainz_db=# select count(*) from l_album_url where modpending <0;
 count
-------
    11
(1 row)

musicbrainz_db=# select count(*) from l_artist_artist where modpending <0;
 count
-------
     9
(1 row)

musicbrainz_db=# select count(*) from l_artist_track where modpending <0;
 count
-------
     7
(1 row)

musicbrainz_db=# select count(*) from l_artist_url where modpending <0;
 count
-------
     4
(1 row)

musicbrainz_db=# select count(*) from l_track_track where modpending <0;
 count
-------
     1
(1 row)



_______________________________________________
MusicBrainz-devel mailing list
[EMAIL PROTECTED]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel