fopina / django-bulk-update-or-create

`bulk_update_or_create` for Django model managers
MIT License
148 stars 16 forks source link

Concurrency and select_for_update #9

Open rtubio opened 3 years ago

rtubio commented 3 years ago

I am currently using django-bulk-update-or-create and I would like to know if this project has been tested already in concurrent environments.

Since the selection of objects to be updated is done internally, I would like to kindly ask if there is any limitation when using select_for_update when calling bulk_update.

Is the utilization of select_for_update a considered use case, so that it will be used when updating models in bulk from within bulk_update_or_create?

Thanks in advance!

fopina commented 3 years ago

Hi @rtubio you're right (if I understood you well), select_for_update should be used here, to avoid concurrency issues and dataloss. Added to the ToDo