Errors in Chaser Scoring

In chasing down a bug recently with the SOTAwatch3 Log Chaser feature, we identified two issues that have resulted in incorrect chaser scores being calculated for some participants:

  • Race condition due to inadvertent multiple logging of chases. In this situation, pressing the “Submit” button on the Log Chaser dialog several times could send duplicate chase logs to the database. In certain situations (for example, when the DB is under heavy load), a log would not be finished scoring before a new log request arrived, resulting in both receiving points. This bug was resolved via better guards around the submission form and DB schema, and altering the logic in handling chaser log requests on the API side (both to fix this and enable more flexibility in features in future).

  • Unknown bug in early SOTAData code. This bug manifested in similar ways, where duplicate uploads of chases were sometimes double scored. There are no instances of this past approximately 2015, suggesting that at some point a fix was inadvertently found. Looking at it from afar, it most likely was in the CSV handling code, and probably was fixed around the time the V1 format CSV file was stopped being supported (or used, whichever came first). Another possibility is that prior to 2004, duplicate chases were allowed and at some point part of that code wasn’t removed. In any case, while the bug was resolved (somehow), the errors in chaser scoring remain in the DB.

In order to rectify this, the IT Team will run a script to adjust the logs as needed, which will result in some people (about 210) losing some points. In most instances (~60%), there is only a single duplicate entry, and so the points lost will be no more than 10 points, and 80% of entries have only two duplicate entries.

In three instances, approximately 100 points will be lost on average. However, any awards made on the basis of the existing chaser score will still stand, and in any case, the chasers in question mostly have in excess of 40 or 50,000 points - so it’s a) understandable that a few duplicate entries were missed, and b) not going to have a major effect on their overall scores anyway!

This script will run over the coming days and the impacted chasers can expect to see an adjustment before the end of the week.

It’s not every day you get to fix a bug that’s been around since at least 2005, but unfortunately in this instance there’ll be an impact on several users for which we apologise.

10 Likes

I’ve discussed this with Andrew a few times and I think it was probably not known there was a dupe score bug in the original C# code but was fixed “by accident” by me when other changes were made to the uploading of CSV files, possibly fixes to the V2 format files. I know there were quite a few corner cases in the CSV parser that slowly got exercised out of the system.

3 Likes

The bug adjustment cost me 30 points out of 95,584. Pfft

EL

4 Likes