C
C#3mo ago
Aqualized

Catching an error in a batch transaction

Hello, I'm sick right now and I can hardly think straight. I have a batches each containing 1000 entities. I create batches with 100 entities. For each sub part of an entity i create an UpdateRange from flexlabs. Worked well until file got changed and now i can get incorrect entity in batch. How can I catch incorrect objects and continue the transaction without them? Models look like that A containts B's each B contains C => C contains D A contains E for each of the models(A...E) i have an UpsertRange if all working well transaction completes and if even one entity in any UpsertRange was incorrect, then the hole batch is thrown away Any ideas of instruments for this task? P.S. I'm using PostgreSQL
2 Replies
this_is_pain
this_is_pain3mo ago
are you saying the db is doing the check if saving/writing works? are you not able to understand which items don't work beforehand?
Aqualized
AqualizedOP3mo ago
I can, but it will take a lot of time and a huge portion of performance. The whole point of code was to perform ranged upserts for batches

Did you find this page helpful?