dennisgorelik: 2020-06-13 in my home office (Default)
Dennis Gorelik ([personal profile] dennisgorelik) wrote2020-06-08 06:40 pm
Entry tags:

5 years old bug

Today 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()
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.
juan_gandhi: (Default)

[personal profile] juan_gandhi 2020-06-09 01:02 am (UTC)(link)
Да, печально. Ну мало же кто так подробно тестирует, по жизни-то. В GRM (google crm) подробно тестировали.