KamoCRM

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

Fixkamo-shared-library
Shipped
20 ஆகஸ்ட், 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing