Indicia-Team / warehouse

GNU General Public License v3.0
5 stars 3 forks source link

Potential duplication of verification notifications #444

Closed johnvanbreda closed 2 years ago

johnvanbreda commented 2 years ago

Verifier notifications can be duplicated in the following circumstance (due to optimisations applied a few days ago). As the verification timestamp isn't checked against maxTime, it can be picked up by the notifications query before the time-window allocated by the schedulde tasks process. But the comment which provides the source detail for the notification is checked against maxTime so is only found inside the time window. This means the verification can be picked up before the comment, so the source detail is empty. As the source detail is one of the fields used when matching to check the notification doesn't exist, following scans by the notification query can cause duplicates.