what's the point of doing this

I assume it is "atomicity" -- making sure the update/insert pair is indivisible.... and that it is impossible to do one without the other. Depending on application, that could be catastrophic...




On 08/25/2017 04:39 AM, Fendy Purnomo wrote:
Hi,

I'm relatively new to Django and have use it in past few months.

Recently I stumbled upon a SQL deadlock. After digging deeper it was caused by SQL gap lock when inserting.

Then I found that Django upsert is actually putting update/insert inside one transaction. I might be missing what's the point of doing this but why don't we put it in different transaction?

I am really new to DBA stuffs and a bit lost where to start. Really glad for any kind of help! Thanks in advance :D

Regards,
Fendy
--
You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a9d77d3b-c538-4912-ad7b-b4ce2ea06b55%40googlegroups.com <https://groups.google.com/d/msgid/django-users/a9d77d3b-c538-4912-ad7b-b4ce2ea06b55%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21e272fc-531c-21ca-5101-f19605285a96%40musicplace.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to