Given a batch size, are batch operations atomic?

From the docs:

The batch_size parameter controls how many objects are created in a single query.

So during a bulk_update, if a batch_size is provided resulting in multiple queries, is the overall operation atomic? If one of the batch fails, are the previous batches rolled back or is this something that should be handled explicitly?

Thank you.

Yes, the batched updates are wrapped in an atomic block.

1 Like