Skip to content

Commit

Permalink
Fix ancient bug re marking projects bad.
Browse files Browse the repository at this point in the history
When pgdp.net first introduced bad pages (back in the R1/R2 days),
the two rounds had quite different criteria for
how bad pages caused a project to be marked bad.
Over time, the criteria became more alike,
but pages_indicate_bad_project() retained an if-stmt
to add a special case for R2 (round_number == 2),
such that a project was deemed bad if it had
at least one bad page and no available pages.

When pgdp.net changed to 4 rounds in June 2005,
we should have done something to eliminate the R2-specificity
of this code, but didn't. So it became a bug that lay unnoticed
until a week or so ago, when Walt Farrell spotted it,
after its effect in P2 was observed in projectID57affd75eab72.

There are various ways one could fix the bug
(i.e., eliminate the 'round 2' specificity),
but the least-impact approach is probably
to simply delete the special case code,
which is what this commit does.
  • Loading branch information
jmdyck committed Jan 22, 2017
1 parent a1e7a1e commit 778233e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tools/project_manager/automodify.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ function pages_indicate_bad_project( $projectid, $round )
if ($n_bad_pages >= 10 && $n_unique_reporters >= 3) return TRUE;


// In round 2, if it has any bad pages
// and no available pages, it's bad.
//
if ($round->round_number == 2)
{
$n_avail_pages = Project_getNumPagesInState($projectid,$round->page_avail_state);
if ($trace) echo "n_avail_pages = $n_avail_pages\n";
if ($n_avail_pages == 0) return TRUE;
}

// Otherwise, it's good.
//
return FALSE;
Expand Down

0 comments on commit 778233e

Please sign in to comment.