Mule 3.9 Bulk update in batch commit failing all records even if one update fails

329 Views Asked by At

My process reads a csv file and updates the DB with the data from CSV. I want to do a bulk update but if I am using batch commit in batch process, and set commit size to 50, it works fine for success records. But if DB update statement fails for even one record, the whole commit size (50 records) are failing to update in DB. I read in mule documentation that some connectors have the ability to handle record-level errors without failing the whole batch(i.e. upsert) and Database connector is one of them. Not sure if this scenario falls under it or not. Did anyone face this kind of issue? Is there a work around this issue without doing record by record update. I would appreciate any thoughts around this issue.

1

There are 1 best solutions below

0
On

The documentation for database bulk operations says it is up to the JDBC driver

It may happen that while some statements in the bulk operation can be successfully executed, some may result in an error. When this occurs, it will be up to the driver to either:

  1. Stop execution immediately and ignore all remaining operations, or
  2. Continue to execute the remaining statements.