Hacker News new | ask | show | jobs
by SahAssar 1693 days ago
> But what happens if the subscription record is deleted from the DB right before emitting the event due to a bug?

Isn't this still inside an uncommitted transaction? What sort of bug would lead to an uncommitted record being deleted that was not a major bug in the database?

If the actual concern is that the record is deleted before the event is processed (not before it is sent as the article seems to be talking about), why not put foreign keys between the outbox and the users to either prevent that or make sure that both are deleted simultaneously?