Record a payload's outcome by column, not by entity

Fixkamo-shared-library
Shipped
August 20, 2026 at 11:11 PM UTC
Author
Kamo
Commit
fefb809

Marking a payload IMPORTED with payloadRepo.save() makes Hibernate walk the detached entity's graph — including organization, which pulls in org_domains — and that read lands in a transaction that has already written. YugabyteDB answers 40001 "Restart read required", the outcome never persists, the payload stays RECEIVED, and the next scheduled run imports a lead that already exists. Observed at roughly 1% of rows on a live batch. markPayloadOutcome updates the three columns this ever needed (status, error, processedAt) and touches nothing else, so it cannot fail for that reason.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing