5 years old bug
Jun. 8th, 2020 06:40 pmToday we discovered and fixed a bug that was running in our backend system for 5 years.
In theory, I know that there are long-running bugs in most complex systems. This bug was one of such practical confirmations.
The correct SQL code should have been:
NonDeliverableEmailResumeUCleanup.cs/MarkResumeUDeletedForSpamComplaint()
But due to the bug, instead of "spProcessPointerSet" MarkResumeUDeletedForSpamComplaint() had "spProcessPointerGet" (second time), so "MarkResumeUDeletedForSpamComplaint" ProcessPointer did not move after finishing batch processing.
Still this buggy system worked.
MarkResumeUDeletedForSpamComplaint() kept reprocessing spam complaint records from the beginning - instead of processing only unprocessed spam complaints.
Finally, 5 years after writing this buggy code, one of the users complained that PostJobFree deletes his resumes several minutes after he post them. We started to investigate and, eventually, found this bug.
In theory, I know that there are long-running bugs in most complex systems. This bug was one of such practical confirmations.
The correct SQL code should have been:
NonDeliverableEmailResumeUCleanup.cs/MarkResumeUDeletedForSpamComplaint()
exec spProcessPointerGet ... select ... update ... exec spProcessPointerSet ...
But due to the bug, instead of "spProcessPointerSet" MarkResumeUDeletedForSpamComplaint() had "spProcessPointerGet" (second time), so "MarkResumeUDeletedForSpamComplaint" ProcessPointer did not move after finishing batch processing.
Still this buggy system worked.
MarkResumeUDeletedForSpamComplaint() kept reprocessing spam complaint records from the beginning - instead of processing only unprocessed spam complaints.
Finally, 5 years after writing this buggy code, one of the users complained that PostJobFree deletes his resumes several minutes after he post them. We started to investigate and, eventually, found this bug.