summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2020-02-14 17:27:57 +0000
committerfja-odoo <fja@odoo.com>2020-02-17 12:43:47 +0000
commit7a000acffd0f203165b59d870e16033081758473 (patch)
tree73da75d9e97d7b8a6bce1f4b844239c62f9e3564 /addons/web/static/src/js/views/basic/basic_controller.js
parenta02e426669119d6c633dce5186ea06e8578989a2 (diff)
[FIX] website: fix website vistor concurent update
When requesting multiple tracked content at the same time with the same visitor concurrent updates happen. The best way I got to consistently reproduce the issue is to open 2 tracked pages with chrome command line: google-chrome http://pcodoo:8069/contactus http://pcodoo:8069/ The first tracked page will update the visitor and lock it. When the second will try to create a track which has a FK referencing the visitor PSQL will try to SELECT FOR KEY SHARE the visitor but it is locked => Concurrent Update Error. Using FOR NO KEY UPDATE instead of FOR UPDATE performs a weaker lock that will not block SELECT FOR KEY SHARE. By doing that we garantee that we will not Update/Delete the PK while we lock the record. closes odoo/odoo#45491 Fixes: https://github.com/odoo/odoo/pull/38372 X-original-commit: 33d0f0bc6b4c84de61ad876311690f26476c32f9 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions