Open genghisken opened 4 years ago
NOTE that creation of a unique index on that column is no longer an option - since we also reference old objects in the ATLAS3 database, some of which are indeed in the same position as several existing ATLAS4 objects (hence are assigned the same ATLAS3 name). The fix is to abstract out the naming process to a separate database (like with Pan-STARRS) - which will itself have a unique key.
Intermediate fix:
Longer term fix: Generate new, separate table with the names, internal object IDs and mean coordinates. ATLAS names in THIS table ARE unique and enforced by a unique or primary key, which is much more efficient (and thread safe) than just doing the above read-before-insert check.
While Pan-STARRS has a completely separate nameserver, the ATLAS database creates names internally. I recently discovered that this process is not "thread safe". In other words, if two people simultaneously promote objects, they can get exactly the same ATLAS name. This has happened 123 times so far - mostly affecting objects in the attic, but there are also 8 affected objects with only 3 unique names in the good list. A list of the RAs and Decs indicates that these are 8 completely different objects, not 3 sets of duplicates. In the list below, ATLAS19qgu objects all got the same tns_designation - but only one of these is correct.
The problem is almost certainly caused by the bulk list update code - and they're always flagged on the same day. It doesn't happen for the good list anymore because I stopped allowing bulk promotion to the good list in October 2019. The majority of the objects are AGNs, which are often bulk promoted to the attic.