2 ms·
> How folks realized the need to do that in one place, but not the other, no-one could adequately explain to me I have seen this pattern before in job queueing
by inopinatus 9y ago
> How folks realized the need to do that in one place, but not the other, no-one could adequately explain to me
I have seen this pattern before in job queueing code that used a RDBMS backend, and it was due to a conflation in the developer's understanding of database semantics, between an open transaction and a lock. Essentially the long-running transaction was being abused in the hope of achieving exactly-once semantics.
Facepalm, I know; one could list many failure modes resulting from such a naive approach, but that was the rationale nevertheless. As you said in another remark, these are teachable moments.